summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt9
-rw-r--r--indra/newview/app_settings/commands.xml2
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml7
-rwxr-xr-xindra/newview/app_settings/settings.xml35
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyV.glsl31
-rw-r--r--indra/newview/featuretable.txt1
-rw-r--r--indra/newview/featuretable_linux.txt1
-rw-r--r--indra/newview/featuretable_mac.txt1
-rw-r--r--indra/newview/featuretable_xp.txt1
-rwxr-xr-xindra/newview/llagent.cpp10
-rwxr-xr-xindra/newview/llagentwearables.cpp5
-rwxr-xr-x[-rw-r--r--]indra/newview/llappearancemgr.cpp34
-rw-r--r--indra/newview/llappviewer.cpp14
-rw-r--r--indra/newview/llappviewerwin32.cpp3
-rw-r--r--indra/newview/llcallfloater.cpp3
-rw-r--r--indra/newview/llchiclet.cpp14
-rw-r--r--indra/newview/llchiclet.h4
-rw-r--r--indra/newview/llexpandabletextbox.cpp2
-rw-r--r--indra/newview/llface.cpp2
-rw-r--r--indra/newview/llfasttimerview.cpp6
-rw-r--r--indra/newview/llfilepicker.cpp27
-rw-r--r--indra/newview/llfloateravatarpicker.cpp5
-rw-r--r--indra/newview/llfloaterbuildoptions.cpp49
-rw-r--r--indra/newview/llfloaterbuildoptions.h7
-rw-r--r--indra/newview/llfloaterbuy.cpp3
-rw-r--r--indra/newview/llfloaterbvhpreview.cpp (renamed from indra/newview/llfloateranimpreview.cpp)110
-rw-r--r--indra/newview/llfloaterbvhpreview.h (renamed from indra/newview/llfloateranimpreview.h)17
-rw-r--r--indra/newview/llfloatereditsky.cpp37
-rw-r--r--indra/newview/llfloatermediasettings.cpp6
-rw-r--r--indra/newview/llfloatermediasettings.h1
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp12
-rw-r--r--indra/newview/llfloaternamedesc.cpp19
-rw-r--r--indra/newview/llfloaternamedesc.h7
-rwxr-xr-xindra/newview/llfloaterpreference.cpp42
-rw-r--r--indra/newview/llfloaterpreference.h8
-rw-r--r--indra/newview/llfloaterregioninfo.h1
-rw-r--r--indra/newview/llfloaterreporter.h1
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp6
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp5
-rw-r--r--indra/newview/llfloatertexturefetchdebugger.cpp390
-rw-r--r--indra/newview/llfloatertexturefetchdebugger.h71
-rw-r--r--indra/newview/llfloatertools.cpp42
-rw-r--r--indra/newview/llfloatertools.h2
-rw-r--r--indra/newview/llfloatertranslationsettings.cpp2
-rw-r--r--indra/newview/llfolderview.cpp22
-rw-r--r--indra/newview/llfolderviewitem.cpp8
-rw-r--r--indra/newview/llfolderviewitem.h1
-rw-r--r--indra/newview/llgrouplist.cpp16
-rw-r--r--indra/newview/llgrouplist.h1
-rw-r--r--indra/newview/llhudrender.cpp2
-rw-r--r--indra/newview/llhudtext.cpp6
-rw-r--r--indra/newview/llimhandler.cpp12
-rw-r--r--indra/newview/llimview.cpp20
-rw-r--r--indra/newview/llimview.h17
-rw-r--r--indra/newview/llinspecttoast.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp281
-rw-r--r--indra/newview/llinventorybridge.h6
-rw-r--r--indra/newview/llinventoryfilter.cpp124
-rw-r--r--indra/newview/llinventoryfilter.h9
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp441
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h20
-rw-r--r--indra/newview/llinventorypanel.cpp2
-rw-r--r--indra/newview/llinventorypanel.h2
-rw-r--r--indra/newview/llmemoryview.cpp2
-rwxr-xr-xindra/newview/llmeshrepository.cpp16
-rw-r--r--indra/newview/llmutelist.h1
-rw-r--r--indra/newview/llnearbychatbar.cpp6
-rw-r--r--indra/newview/llnearbychatbar.h2
-rw-r--r--indra/newview/llnearbychathandler.cpp11
-rw-r--r--indra/newview/llnetmap.cpp133
-rw-r--r--indra/newview/llnetmap.h2
-rw-r--r--indra/newview/llnotificationalerthandler.cpp18
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp16
-rw-r--r--indra/newview/llnotificationhandler.h4
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp2
-rw-r--r--indra/newview/llnotificationmanager.cpp28
-rw-r--r--indra/newview/llnotificationmanager.h5
-rw-r--r--indra/newview/llnotificationofferhandler.cpp19
-rw-r--r--indra/newview/llnotificationscripthandler.cpp20
-rw-r--r--indra/newview/llnotificationtiphandler.cpp17
-rw-r--r--indra/newview/llpanelface.cpp9
-rw-r--r--indra/newview/llpanelgrouproles.cpp5
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp2
-rw-r--r--indra/newview/llpanellogin.cpp16
-rw-r--r--indra/newview/llpanelmaininventory.cpp2
-rw-r--r--indra/newview/llpanelpeople.cpp7
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp2
-rw-r--r--indra/newview/llpanelprimmediacontrols.h2
-rw-r--r--indra/newview/llpanelvoiceeffect.cpp1
-rw-r--r--indra/newview/llparticipantlist.cpp12
-rw-r--r--indra/newview/llparticipantlist.h4
-rw-r--r--indra/newview/llplacesinventorybridge.cpp4
-rw-r--r--indra/newview/llpopupview.cpp2
-rw-r--r--indra/newview/llpreview.h1
-rw-r--r--indra/newview/llpreviewanim.cpp146
-rw-r--r--indra/newview/llpreviewanim.h20
-rw-r--r--indra/newview/llscreenchannel.cpp295
-rw-r--r--indra/newview/llscreenchannel.h33
-rw-r--r--indra/newview/llsechandler_basic.cpp12
-rw-r--r--indra/newview/llsidepanelinventory.cpp10
-rw-r--r--indra/newview/llspeakers.cpp14
-rw-r--r--indra/newview/llspeakers.h7
-rwxr-xr-xindra/newview/llstartup.cpp1
-rw-r--r--indra/newview/lltexturectrl.cpp9
-rwxr-xr-xindra/newview/lltexturefetch.cpp691
-rw-r--r--indra/newview/lltexturefetch.h193
-rwxr-xr-xindra/newview/lltextureview.cpp6
-rw-r--r--indra/newview/lltoast.cpp24
-rw-r--r--indra/newview/lltoast.h29
-rw-r--r--indra/newview/lltoastalertpanel.cpp25
-rw-r--r--indra/newview/lltoastalertpanel.h1
-rw-r--r--indra/newview/lltoastpanel.cpp2
-rw-r--r--indra/newview/lltooldraganddrop.cpp17
-rw-r--r--indra/newview/lltooldraganddrop.h9
-rw-r--r--indra/newview/lltoolmgr.cpp11
-rw-r--r--indra/newview/lltoolmgr.h2
-rwxr-xr-xindra/newview/lltranslate.cpp10
-rwxr-xr-xindra/newview/lltranslate.h1
-rw-r--r--indra/newview/lluploaddialog.cpp2
-rw-r--r--indra/newview/llviewercamera.h2
-rw-r--r--indra/newview/llviewerdisplay.cpp3
-rw-r--r--indra/newview/llviewerfloaterreg.cpp11
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerinventory.cpp30
-rwxr-xr-xindra/newview/llviewerjointmesh.cpp1
-rw-r--r--indra/newview/llviewermedia.cpp45
-rw-r--r--indra/newview/llviewermedia.h3
-rw-r--r--indra/newview/llviewermenu.cpp17
-rw-r--r--indra/newview/llviewermenufile.cpp34
-rwxr-xr-xindra/newview/llviewermessage.cpp44
-rw-r--r--indra/newview/llviewermessage.h1
-rw-r--r--indra/newview/llviewerobject.cpp5
-rw-r--r--indra/newview/llviewershadermgr.cpp31
-rw-r--r--indra/newview/llviewertexteditor.cpp2
-rw-r--r--indra/newview/llviewertexture.cpp46
-rw-r--r--indra/newview/llviewertexture.h4
-rw-r--r--indra/newview/llviewertexturelist.h6
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerwindow.cpp41
-rwxr-xr-xindra/newview/llvoavatar.cpp24
-rwxr-xr-xindra/newview/llvoavatarself.cpp14
-rw-r--r--indra/newview/llvosky.cpp22
-rw-r--r--indra/newview/llvosky.h2
-rw-r--r--indra/newview/llvovolume.cpp15
-rw-r--r--indra/newview/llwaterparammanager.cpp2
-rw-r--r--indra/newview/llwlparammanager.cpp5
-rw-r--r--indra/newview/llwlparammanager.h9
-rw-r--r--indra/newview/llwlparamset.cpp94
-rw-r--r--indra/newview/llwlparamset.h2
-rw-r--r--indra/newview/llworld.cpp52
-rw-r--r--indra/newview/llworldmapview.cpp31
-rw-r--r--indra/newview/llworldmapview.h4
-rw-r--r--indra/newview/pipeline.cpp36
-rw-r--r--indra/newview/pipeline.h3
-rw-r--r--indra/newview/skins/default/colors.xml6
-rw-r--r--indra/newview/skins/default/textures/checker.pngbin0 -> 130 bytes
-rw-r--r--indra/newview/skins/default/textures/map_avatar_unknown_32.tgabin0 -> 4140 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_aaa.xml158
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml22
-rw-r--r--indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml76
-rw-r--r--indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml (renamed from indra/newview/skins/default/xui/en/floater_animation_preview.xml)0
-rw-r--r--indra/newview/skins/default/xui/en/floater_build_options.xml61
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_contents.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_currency.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_object.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_choose_group.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_fast_timers.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_merchant_outbox.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml86
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_animation.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml20
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml112
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_textbox.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml341
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml62
-rw-r--r--indra/newview/skins/default/xui/en/floater_toybox.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_controls.xml2
-rw-r--r--indra/newview/skins/default/xui/en/inspect_object.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml17
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_header.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_item.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_inbox_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_instant_message.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml15
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat.xml84
-rw-r--r--indra/newview/skins/default/xui/en/panel_notification.xml18
-rw-r--r--indra/newview/skins/default/xui/en/panel_online_status_toast.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_sys_well_item.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_teleport_history_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml2
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml3
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml8
-rw-r--r--indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/button.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/check_box.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/tab_container.xml2
-rw-r--r--indra/newview/tests/llworldmipmap_test.cpp4
-rw-r--r--indra/newview/viewer_manifest.py4
223 files changed, 4531 insertions, 1567 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f85b943c70..3b719ac397 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -166,7 +166,7 @@ set(viewer_SOURCE_FILES
llfirstuse.cpp
llflexibleobject.cpp
llfloaterabout.cpp
- llfloateranimpreview.cpp
+ llfloaterbvhpreview.cpp
llfloaterauction.cpp
llfloateravatar.cpp
llfloateravatarpicker.cpp
@@ -236,6 +236,7 @@ set(viewer_SOURCE_FILES
llfloatertelehub.cpp
llfloatertestinspectors.cpp
llfloatertestlistview.cpp
+ llfloatertexturefetchdebugger.cpp
llfloatertools.cpp
llfloatertopobjects.cpp
llfloatertos.cpp
@@ -722,7 +723,7 @@ set(viewer_HEADER_FILES
llfirstuse.h
llflexibleobject.h
llfloaterabout.h
- llfloateranimpreview.h
+ llfloaterbvhpreview.h
llfloaterauction.h
llfloateravatar.h
llfloateravatarpicker.h
@@ -792,6 +793,7 @@ set(viewer_HEADER_FILES
llfloatertelehub.h
llfloatertestinspectors.h
llfloatertestlistview.h
+ llfloatertexturefetchdebugger.h
llfloatertools.h
llfloatertopobjects.h
llfloatertos.h
@@ -1345,7 +1347,9 @@ if (WINDOWS)
DXGUID_LIBRARY
)
+# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs)
set(viewer_LIBRARIES
+ opengl32
${WINDOWS_LIBRARIES}
comdlg32
${DINPUT_LIBRARY}
@@ -1355,7 +1359,6 @@ if (WINDOWS)
odbccp32
ole32
oleaut32
- opengl32
shell32
Vfw32
winspool
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 1d1d39c786..73df064ab2 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -37,6 +37,8 @@
tooltip_ref="Command_Build_Tooltip"
execute_function="Build.Toggle"
execute_parameters="build"
+ is_enabled_function="Build.Enabled"
+ is_enabled_parameters="build"
is_running_function="Floater.IsOpen"
is_running_parameters="build"
/>
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 81e0b5602c..64122bbb6c 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -42,9 +42,10 @@
</array>
<key>tags</key>
<array>
- <string>Avatar</string>
- <!-- sample entry for debugging a specific item -->
-<!-- <string>Voice</string> -->
+ <!-- sample entry for debugging specific items
+ <string>Avatar</string>
+ <string>Voice</string>
+ -->
</array>
</map>
</array>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index eb3fcc30ee..bd14580205 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4271,6 +4271,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>InventoryInboxToggleState</key>
+ <map>
+ <key>Comment</key>
+ <string>Stores the open/closed state of inventory Received items panel</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>InventoryLinking</key>
<map>
<key>Comment</key>
@@ -10631,6 +10642,17 @@
<key>Value</key>
<real>20.0</real>
</map>
+ <key>TexelPixelRatio</key>
+ <map>
+ <key>Comment</key>
+ <string>texel pixel ratio = texel / pixel</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>1.0</real>
+ </map>
<key>TextureCameraMotionThreshold</key>
<map>
<key>Comment</key>
@@ -10640,7 +10662,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>0.2</integer>
+ <real>0.2</real>
</map>
<key>TextureCameraMotionBoost</key>
<map>
@@ -10686,6 +10708,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>TextureFetchDebuggerEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable the texture fetching debugger if set</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>TextureLoadFullRes</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
index 40b0cf47ac..eada38eaaa 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
@@ -55,6 +55,12 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 8c96d55342..5c36118a50 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -64,6 +64,12 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
index c0edddc40a..d6149fcc32 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
@@ -59,6 +59,12 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index 64e094e3c5..17f425475c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -50,18 +50,18 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
+uniform float haze_horizon;
+uniform float haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 max_y;
+uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
-uniform vec4 cloud_scale;
+uniform float cloud_scale;
void main()
{
@@ -77,7 +77,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
- P *= (max_y.x / P.y);
+ P *= (max_y / P.y);
}
else
{
@@ -99,12 +99,12 @@ void main()
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+ light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
- temp1 = blue_density + haze_density.x;
+ temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
- haze_weight = haze_density.x / temp1;
+ haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -112,7 +112,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
- temp2.z = Plen * density_multiplier.x;
+ temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -136,14 +136,14 @@ void main()
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
- tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
- sunlight *= (1. - cloud_shadow.x);
+ sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// CLOUDS
@@ -164,13 +164,13 @@ void main()
vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1);
// Make a nice cloud density based on the cloud_shadow value that was passed in.
- vary_CloudDensity = 2. * (cloud_shadow.x - 0.25);
+ vary_CloudDensity = 2. * (cloud_shadow - 0.25);
// Texture coords
vary_texcoord0 = texcoord0;
vary_texcoord0.xy -= 0.5;
- vary_texcoord0.xy /= cloud_scale.x;
+ vary_texcoord0.xy /= cloud_scale;
vary_texcoord0.xy += 0.5;
vary_texcoord1 = vary_texcoord0;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
index 721de18e0b..cb7603f4fd 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -44,19 +44,17 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
+uniform float haze_horizon;
+uniform float haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 max_y;
+uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
-uniform vec4 cloud_scale;
-
void main()
{
@@ -71,7 +69,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
- P *= (max_y.x / P.y);
+ P *= (max_y / P.y);
}
else
{
@@ -93,12 +91,12 @@ void main()
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+ light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
- temp1 = blue_density + haze_density.x;
+ temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
- haze_weight = haze_density.x / temp1;
+ haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -106,7 +104,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
- temp2.z = Plen * density_multiplier.x;
+ temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -131,20 +129,20 @@ void main()
// Haze color above cloud
vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient)
- + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + ambient)
+ + (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient)
);
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
- tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
- sunlight *= (1. - cloud_shadow.x);
+ sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// Final atmosphere additive
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 51110ae4df..0c53a4ffa5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -51,12 +51,12 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
+uniform float haze_horizon;
+uniform float haze_density;
+uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float distance_multiplier;
+uniform float max_y;
uniform vec4 glow;
uniform float scene_light_strength;
uniform mat3 env_mat;
@@ -159,13 +159,13 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//sunlight attenuation effect (hue and brightness) due to atmosphere
//this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
+ light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
//I had thought blue_density and haze_density should have equal weighting,
//but attenuation due to haze_density tends to seem too strong
- temp1 = blue_density + vec4(haze_density.r);
+ temp1 = blue_density + vec4(haze_density);
blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
+ haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2.y = max(0.0, tmpLightnorm.y);
@@ -173,12 +173,12 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
sunlight *= exp( - light_atten * temp2.y);
// main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
+ temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
+ // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati
// compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
+ temp1 = exp(-temp1 * temp2.z * distance_multiplier);
//final atmosphere attenuation factor
setAtmosAttenuation(temp1.rgb);
@@ -199,7 +199,7 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
temp2.x += .25;
//increase ambient when there are more clouds
- vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
+ vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5;
/* decrease value and saturation (that in HSV, not HSL) for occluded areas
* // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
@@ -213,8 +213,8 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//haze color
setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
+ vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
//brightness of surface both sunlight and ambient
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
index 83815b1786..9629cfe824 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
@@ -61,6 +61,12 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index 1660f9687e..1586aab0f2 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -63,6 +63,12 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
index 84c27edb26..44aaa98b97 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
@@ -60,6 +60,12 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 97f3063a9e..27ea77b5a2 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -51,12 +51,12 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
+uniform float haze_horizon;
+uniform float haze_density;
+uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float distance_multiplier;
+uniform float max_y;
uniform vec4 glow;
uniform float scene_light_strength;
uniform mat3 env_mat;
@@ -161,13 +161,13 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//sunlight attenuation effect (hue and brightness) due to atmosphere
//this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
+ light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
//I had thought blue_density and haze_density should have equal weighting,
//but attenuation due to haze_density tends to seem too strong
- temp1 = blue_density + vec4(haze_density.r);
+ temp1 = blue_density + vec4(haze_density);
blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
+ haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2.y = max(0.0, tmpLightnorm.y);
@@ -175,12 +175,12 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
sunlight *= exp( - light_atten * temp2.y);
// main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
+ temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
+ // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati
// compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
+ temp1 = exp(-temp1 * temp2.z * distance_multiplier);
//final atmosphere attenuation factor
setAtmosAttenuation(temp1.rgb);
@@ -201,7 +201,7 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
temp2.x += .25;
//increase ambient when there are more clouds
- vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
+ vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5;
/* decrease value and saturation (that in HSV, not HSL) for occluded areas
* // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
@@ -215,8 +215,8 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//haze color
setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
+ vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
//brightness of surface both sunlight and ambient
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
index 6a83be1426..da3d922017 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -47,12 +47,12 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
+uniform float haze_horizon;
+uniform float haze_density;
+uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float distance_multiplier;
+uniform float max_y;
uniform vec4 glow;
void calcAtmospherics(vec3 inPositionEye) {
@@ -61,8 +61,8 @@ void calcAtmospherics(vec3 inPositionEye) {
setPositionEye(P);
//(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
+ if (P.y > max_y) P *= (max_y / P.y);
+ if (P.y < -max_y) P *= (-max_y / P.y);
vec3 tmpLightnorm = lightnorm.xyz;
@@ -78,13 +78,13 @@ void calcAtmospherics(vec3 inPositionEye) {
//sunlight attenuation effect (hue and brightness) due to atmosphere
//this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
+ light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
//I had thought blue_density and haze_density should have equal weighting,
//but attenuation due to haze_density tends to seem too strong
- temp1 = blue_density + vec4(haze_density.r);
+ temp1 = blue_density + vec4(haze_density);
blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
+ haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2.y = max(0.0, tmpLightnorm.y);
@@ -92,12 +92,12 @@ void calcAtmospherics(vec3 inPositionEye) {
sunlight *= exp( - light_atten * temp2.y);
// main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
+ temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
+ // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati
// compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
+ temp1 = exp(-temp1 * temp2.z * distance_multiplier);
//final atmosphere attenuation factor
setAtmosAttenuation(temp1.rgb);
@@ -122,12 +122,12 @@ void calcAtmospherics(vec3 inPositionEye) {
//increase ambient when there are more clouds
- vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
+ vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5;
//haze color
setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
+ vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
//brightness of surface both sunlight and ambient
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index c5bb52169c..c1dd45cd67 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -49,18 +49,18 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
+uniform float haze_horizon;
+uniform float haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 max_y;
+uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
-uniform vec4 cloud_scale;
+uniform float cloud_scale;
void main()
{
@@ -76,7 +76,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
- P *= (max_y.x / P.y);
+ P *= (max_y / P.y);
}
else
{
@@ -98,12 +98,12 @@ void main()
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+ light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
- temp1 = blue_density + haze_density.x;
+ temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
- haze_weight = haze_density.x / temp1;
+ haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -111,7 +111,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
- temp2.z = Plen * density_multiplier.x;
+ temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -135,14 +135,14 @@ void main()
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
- tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
- sunlight *= (1. - cloud_shadow.x);
+ sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// CLOUDS
@@ -163,13 +163,13 @@ void main()
vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1);
// Make a nice cloud density based on the cloud_shadow value that was passed in.
- vary_CloudDensity = 2. * (cloud_shadow.x - 0.25);
+ vary_CloudDensity = 2. * (cloud_shadow - 0.25);
// Texture coords
vary_texcoord0 = texcoord0;
vary_texcoord0.xy -= 0.5;
- vary_texcoord0.xy /= cloud_scale.x;
+ vary_texcoord0.xy /= cloud_scale;
vary_texcoord0.xy += 0.5;
vary_texcoord1 = vary_texcoord0;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
index 46773cf89f..3788ddaf2d 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -42,19 +42,17 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
+uniform float haze_horizon;
+uniform float haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 max_y;
+uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
-uniform vec4 cloud_scale;
-
void main()
{
@@ -68,7 +66,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
- P *= (max_y.x / P.y);
+ P *= (max_y / P.y);
}
else
{
@@ -87,15 +85,14 @@ void main()
vec4 sunlight = sunlight_color;
vec4 light_atten;
-
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+ light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
- temp1 = blue_density + haze_density.x;
+ temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
- haze_weight = haze_density.x / temp1;
+ haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -103,7 +100,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
- temp2.z = Plen * density_multiplier.x;
+ temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -128,20 +125,20 @@ void main()
// Haze color above cloud
vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient)
- + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + ambient)
+ + (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient)
);
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
- tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
- sunlight *= (1. - cloud_shadow.x);
+ sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// Final atmosphere additive
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 0f33d40ac3..76bb2b0976 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -42,7 +42,6 @@ RenderGamma 1 0
RenderGlowResolutionPow 1 9
RenderGround 1 1
RenderMaxPartCount 1 8192
-RenderNightBrightness 1 1.0
RenderObjectBump 1 1
RenderLocalLights 1 1
RenderReflectionDetail 1 4
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 8142311a55..5e217e000a 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -43,7 +43,6 @@ RenderGlowResolutionPow 1 9
RenderGround 1 1
RenderLocalLights 1 1
RenderMaxPartCount 1 8192
-RenderNightBrightness 1 1.0
RenderObjectBump 1 1
RenderReflectionDetail 1 4
RenderTerrainDetail 1 1
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 942c043081..915a012a39 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -43,7 +43,6 @@ RenderGlowResolutionPow 1 9
RenderGround 1 1
RenderLocalLights 1 1
RenderMaxPartCount 1 8192
-RenderNightBrightness 1 1.0
RenderObjectBump 1 1
RenderReflectionDetail 1 4
RenderTerrainDetail 1 1
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index 278d601860..ae2cf910f2 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -43,7 +43,6 @@ RenderGlowResolutionPow 1 9
RenderGround 1 1
RenderLocalLights 1 1
RenderMaxPartCount 1 8192
-RenderNightBrightness 1 1.0
RenderObjectBump 1 1
RenderReflectionDetail 1 4
RenderTerrainDetail 1 1
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 5f07501983..3367604753 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -169,11 +169,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
const std::string& param = sdname.asString();
- if (param == "build")
- {
- retval = gAgent.canEditParcel();
- }
- else if (param == "speak")
+ if (param == "speak")
{
if ( gAgent.isVoiceConnected() &&
LLViewerParcelMgr::getInstance()->allowAgentVoice() &&
@@ -3790,7 +3786,7 @@ void LLAgent::sendAgentSetAppearance()
}
gAgentAvatarp->sendAppearanceChangeMetrics();
- LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << LL_ENDL;
+ LL_INFOS("Avatar") << gAgentAvatarp->avString() << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << LL_ENDL;
//dumpAvatarTEs( "sendAgentSetAppearance()" );
LLMessageSystem* msg = gMessageSystem;
@@ -3837,7 +3833,7 @@ void LLAgent::sendAgentSetAppearance()
// only update cache entries if we have all our baked textures
if (textures_current)
{
- LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << LL_ENDL;
+ LL_INFOS("Avatar") << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << LL_ENDL;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
BOOL generate_valid_hash = TRUE;
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 0104d2b088..e441f21f90 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -817,7 +817,10 @@ void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index)
if (wearable)
{
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
+ if (isAgentAvatarValid())
+ {
gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE);
+ }
wearable->setLabelUpdated();
}
}
@@ -1642,7 +1645,7 @@ void LLAgentWearables::queryWearableCache()
gAgentAvatarp->outputRezTiming("Fetching textures from cache");
}
- LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL;
+ LL_INFOS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL;
gMessageSystem->sendReliable(gAgent.getRegion()->getHost());
gAgentQueryManager.mNumPendingQueries++;
gAgentQueryManager.mWearablesCacheQueryID++;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 73dd64dffe..faadfb4b87 100644..100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -162,7 +162,7 @@ public:
mCatID = cat_id;
mAppend = append;
- LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL;
selfStartPhase("wear_inventory_category_callback");
}
@@ -182,7 +182,7 @@ public:
protected:
~LLWearInventoryCategoryCallback()
{
- LL_DEBUGS("Avatar") << self_av_string() << "done all inventory callbacks" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "done all inventory callbacks" << LL_ENDL;
selfStopPhase("wear_inventory_category_callback");
@@ -229,7 +229,7 @@ LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit
LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
{
- LL_DEBUGS("Avatar") << self_av_string() << "done update appearance on destroy" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "done update appearance on destroy" << LL_ENDL;
selfStopPhase("update_appearance_on_destroy");
@@ -492,7 +492,7 @@ void LLWearableHoldingPattern::onAllComplete()
}
// Update wearables.
- LL_DEBUGS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
LLAppearanceMgr::instance().updateAgentWearables(this, false);
// Update attachments to match those requested.
@@ -542,7 +542,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
if (done)
{
- LL_DEBUGS("Avatar") << self_av_string() << "polling, done status: " << completed << " timed out " << timed_out
+ LL_INFOS("Avatar") << self_av_string() << "polling, done status: " << completed << " timed out " << timed_out
<< " elapsed " << mWaitTime.getElapsedTimeF32() << LL_ENDL;
mFired = true;
@@ -696,7 +696,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable))
{
// Wearable link that was never resolved; remove links to it from COF
- LL_DEBUGS("Avatar") << self_av_string() << "removing link for unresolved item " << data.mItemID.asString() << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "removing link for unresolved item " << data.mItemID.asString() << LL_ENDL;
LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false);
}
}
@@ -716,7 +716,7 @@ bool LLWearableHoldingPattern::pollMissingWearables()
if (!done)
{
- LL_DEBUGS("Avatar") << self_av_string() << "polling missing wearables, waiting for items " << mTypesToRecover.size()
+ LL_INFOS("Avatar") << self_av_string() << "polling missing wearables, waiting for items " << mTypesToRecover.size()
<< " links " << mTypesToLink.size()
<< " wearables, timed out " << timed_out
<< " elapsed " << mWaitTime.getElapsedTimeF32()
@@ -763,7 +763,7 @@ void LLWearableHoldingPattern::handleLateArrivals()
llwarns << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << llendl;
}
- LL_DEBUGS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL;
// Update mFoundList using late-arriving wearables.
std::set<LLWearableType::EType> replaced_types;
@@ -1450,7 +1450,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
- LL_DEBUGS("Avatar") << self_av_string() << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "starting, cat '" << (pcat ? pcat->getName() : "[UNKNOWN]") << "'" << LL_ENDL;
const LLUUID cof = getCOF();
@@ -1716,7 +1716,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF);
- LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL;
//checking integrity of the COF in terms of ordering of wearables,
//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
@@ -1892,7 +1892,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
gAgentWearables.notifyLoadingStarted();
- LL_DEBUGS("Avatar") << self_av_string() << "wearInventoryCategory( " << category->getName()
+ LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategory( " << category->getName()
<< " )" << LL_ENDL;
selfStartPhase("wear_inventory_category_fetch");
@@ -1903,7 +1903,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append)
{
- LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL;
selfStopPhase("wear_inventory_category_fetch");
@@ -1988,8 +1988,8 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
// wearables being dirty.
if(!category) return;
- LL_DEBUGS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar( " << category->getName()
- << " )" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar '" << category->getName()
+ << "'" << LL_ENDL;
if (gAgentCamera.cameraCustomizeAvatar())
{
@@ -2002,7 +2002,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
void LLAppearanceMgr::wearOutfitByName(const std::string& name)
{
- LL_DEBUGS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL;
//inc_busy_count();
LLInventoryModel::cat_array_t cat_array;
@@ -2325,7 +2325,7 @@ const std::string OTHER_GESTURES_FOLDER = "Other Gestures";
void LLAppearanceMgr::copyLibraryGestures()
{
- LL_DEBUGS("Avatar") << self_av_string() << "Copying library gestures" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "Copying library gestures" << LL_ENDL;
// Copy gestures
LLUUID lib_gesture_cat_id =
@@ -2399,7 +2399,7 @@ void LLAppearanceMgr::autopopulateOutfits()
// If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account)
// then auto-populate outfits from the library into the My Outfits folder.
- LL_DEBUGS("Avatar") << self_av_string() << "avatar fully visible" << LL_ENDL;
+ LL_INFOS("Avatar") << self_av_string() << "avatar fully visible" << LL_ENDL;
static bool check_populate_my_outfits = true;
if (check_populate_my_outfits &&
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a627f3868b..178b96e42e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -93,6 +93,7 @@
#include "llsecondlifeurls.h"
#include "llupdaterservice.h"
#include "llcallfloater.h"
+#include "llfloatertexturefetchdebugger.h"
// Linden library includes
#include "llavatarnamecache.h"
@@ -1218,7 +1219,7 @@ bool LLAppViewer::mainLoop()
if(mem_leak_instance)
{
mem_leak_instance->idle() ;
- }
+ }
// canonical per-frame event
mainloop.post(newFrame);
@@ -1403,6 +1404,17 @@ bool LLAppViewer::mainLoop()
LLLFSThread::sLocal->pause();
}
+ //texture fetching debugger
+ if(LLTextureFetchDebugger::isEnabled())
+ {
+ LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance =
+ LLFloaterReg::findTypedInstance<LLFloaterTextureFetchDebugger>("tex_fetch_debugger");
+ if(tex_fetch_debugger_instance)
+ {
+ tex_fetch_debugger_instance->idle() ;
+ }
+ }
+
if ((LLStartUp::getStartupState() >= STATE_CLEANUP) &&
(frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD))
{
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 647ace7ee3..6931b55c4c 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -30,7 +30,8 @@
#include "llmemtype.h"
-#include "llwindowwin32.cpp" // *FIX: for setting gIconResource.
+#include "llwindowwin32.h" // *FIX: for setting gIconResource.
+#include "llgl.h"
#include "res/resource.h" // *FIX: for setting gIconResource.
#include <fcntl.h> //_O_APPEND
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index e3217668c5..f2375bfa4f 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -188,7 +188,7 @@ void LLCallFloater::draw()
// Need to resort the participant list if it's in sort by recent speaker order.
if (mParticipants)
- mParticipants->updateRecentSpeakersOrder();
+ mParticipants->update();
LLFloater::draw();
}
@@ -333,6 +333,7 @@ void LLCallFloater::refreshParticipantList()
if (!non_avatar_caller)
{
+ llassert(mParticipants == NULL); // check for possible memory leak
mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false);
mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1));
const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder");
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index aabab0ccb9..a661808d1f 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -1113,8 +1113,8 @@ LLChicletPanel::~LLChicletPanel()
}
}
-void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
-
+void LLChicletPanel::onMessageCountChanged(const LLSD& data)
+{
LLUUID session_id = data["session_id"].asUUID();
S32 unread = data["participant_unread"].asInteger();
@@ -1139,7 +1139,7 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
}
}
-void object_chiclet_callback(const LLSD& data)
+void LLChicletPanel::objectChicletCallback(const LLSD& data)
{
LLUUID notification_id = data["notification_id"];
bool new_message = data["new_message"];
@@ -1163,10 +1163,10 @@ void object_chiclet_callback(const LLSD& data)
BOOL LLChicletPanel::postBuild()
{
LLPanel::postBuild();
- LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1));
- LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1));
- LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(object_chiclet_callback, _1));
- LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(object_chiclet_callback, _1));
+ LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1));
+ LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1));
+ LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1));
+ LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1));
LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1));
LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1));
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 1f1069dcb4..19683492c2 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -1158,6 +1158,10 @@ protected:
*/
void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param);
+ void onMessageCountChanged(const LLSD& data);
+
+ void objectChicletCallback(const LLSD& data);
+
typedef std::vector<LLChiclet*> chiclet_list_t;
/**
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 2abfbf37ca..935dcb74b0 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -55,7 +55,7 @@ public:
else
{
width = mEditor.getDocumentView()->getRect().getWidth() - mEditor.getHPad();
- height = llceil(mStyle->getFont()->getLineHeight());
+ height = mStyle->getFont()->getLineHeight();
}
return true;
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index cd33a19a2a..cfb4147e71 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1838,7 +1838,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
}
- if (rebuild_color)
+ if (rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_COLOR) )
{
LLFastTimer t(FTM_FACE_GEOM_COLOR);
mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range);
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 233038daba..9664aa7dbe 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -149,7 +149,7 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
{
- S32 idx = (getRect().getHeight() - y) / ((S32) LLFontGL::getFontMonospace()->getLineHeight()+2) - 5;
+ S32 idx = (getRect().getHeight() - y) / (LLFontGL::getFontMonospace()->getLineHeight()+2) - 5;
if (idx >= 0 && idx < (S32)ft_display_idx.size())
{
@@ -552,7 +552,7 @@ void LLFastTimerView::draw()
// update rectangle that includes timer bars
mBarRect.mLeft = xleft;
mBarRect.mRight = getRect().getWidth();
- mBarRect.mTop = ytop - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4);
+ mBarRect.mTop = ytop - (LLFontGL::getFontMonospace()->getLineHeight() + 4);
mBarRect.mBottom = margin + LINE_GRAPH_HEIGHT;
y = ytop;
@@ -846,7 +846,7 @@ void LLFastTimerView::draw()
tdesc = llformat("%4.2f ms", ms);
x = mGraphRect.mRight - LLFontGL::getFontMonospace()->getWidth(tdesc)-5;
- y = mGraphRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight());
+ y = mGraphRect.mTop - LLFontGL::getFontMonospace()->getLineHeight();
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white,
LLFontGL::LEFT, LLFontGL::TOP);
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 8024755e86..8986a694f9 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -49,7 +49,7 @@ LLFilePicker LLFilePicker::sInstance;
#if LL_WINDOWS
#define SOUND_FILTER L"Sounds (*.wav)\0*.wav\0"
#define IMAGE_FILTER L"Images (*.tga; *.bmp; *.jpg; *.jpeg; *.png)\0*.tga;*.bmp;*.jpg;*.jpeg;*.png\0"
-#define ANIM_FILTER L"Animations (*.bvh)\0*.bvh\0"
+#define ANIM_FILTER L"Animations (*.bvh; *.anim)\0*.bvh;*.anim\0"
#define COLLADA_FILTER L"Scene (*.dae)\0*.dae\0"
#ifdef _CORY_TESTING
#define GEOMETRY_FILTER L"SL Geometry (*.slg)\0*.slg\0"
@@ -593,8 +593,10 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB
}
else if (filter == FFLOAD_ANIM)
{
- if (fileInfo.filetype != 'BVH ' &&
- (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
+ if (fileInfo.filetype != 'BVH ' &&
+ fileInfo.filetype != 'ANIM' &&
+ (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) &&
+ fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("anim"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
)
{
result = false;
@@ -1073,8 +1075,11 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer
}
// set the default path for this usage context.
- picker->mContextToPathMap[picker->mCurContextName] =
- gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget));
+ const char* cur_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget));
+ if (cur_folder != NULL)
+ {
+ picker->mContextToPathMap[picker->mCurContextName] = cur_folder;
+ }
gtk_widget_destroy(widget);
gtk_main_quit();
@@ -1196,10 +1201,14 @@ static std::string add_wav_filter_to_gtkchooser(GtkWindow *picker)
LLTrans::getString("sound_files") + " (*.wav)");
}
-static std::string add_bvh_filter_to_gtkchooser(GtkWindow *picker)
+static std::string add_anim_filter_to_gtkchooser(GtkWindow *picker)
{
- return add_simple_pattern_filter_to_gtkchooser(picker, "*.bvh",
- LLTrans::getString("animation_files") + " (*.bvh)");
+ GtkFileFilter *gfilter = gtk_file_filter_new();
+ gtk_file_filter_add_pattern(gfilter, "*.bvh");
+ gtk_file_filter_add_pattern(gfilter, "*.anim");
+ std::string filtername = LLTrans::getString("animation_files") + " (*.bvh; *.anim)";
+ add_common_filters_to_gtkchooser(gfilter, picker, filtername);
+ return filtername;
}
static std::string add_collada_filter_to_gtkchooser(GtkWindow *picker)
@@ -1351,7 +1360,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
filtername = add_wav_filter_to_gtkchooser(picker);
break;
case FFLOAD_ANIM:
- filtername = add_bvh_filter_to_gtkchooser(picker);
+ filtername = add_anim_filter_to_gtkchooser(picker);
break;
case FFLOAD_COLLADA:
filtername = add_collada_filter_to_gtkchooser(picker);
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index aa66fcf9b8..0290e7cdf0 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -63,6 +63,11 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
// *TODO: Use a key to allow this not to be an effective singleton
LLFloaterAvatarPicker* floater =
LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker");
+ if (!floater)
+ {
+ llwarns << "Cannot instantiate avatar picker" << llendl;
+ return NULL;
+ }
floater->mSelectionCallback = callback;
floater->setAllowMultiple(allow_multiple);
diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp
index 86c1bf0534..1b65d8d683 100644
--- a/indra/newview/llfloaterbuildoptions.cpp
+++ b/indra/newview/llfloaterbuildoptions.cpp
@@ -41,13 +41,9 @@
// Methods
//
-void commit_grid_mode(LLUICtrl *);
-
LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
- : LLFloater(key),
- mComboGridMode(NULL)
+ : LLFloater(key)
{
- mCommitCallbackRegistrar.add("GridOptions.gridMode", boost::bind(&commit_grid_mode,_1));
}
LLFloaterBuildOptions::~LLFloaterBuildOptions()
@@ -55,45 +51,9 @@ LLFloaterBuildOptions::~LLFloaterBuildOptions()
BOOL LLFloaterBuildOptions::postBuild()
{
- mComboGridMode = getChild<LLComboBox>("combobox grid mode");
-
return TRUE;
}
-void LLFloaterBuildOptions::setGridMode(EGridMode mode)
-{
- mComboGridMode->setCurrentByIndex((S32)mode);
-}
-
-void LLFloaterBuildOptions::updateGridMode()
-{
- if (mComboGridMode)
- {
- S32 index = mComboGridMode->getCurrentIndex();
- mComboGridMode->removeall();
-
- switch (mObjectSelection->getSelectType())
- {
- case SELECT_TYPE_HUD:
- mComboGridMode->add(getString("grid_screen_text"));
- mComboGridMode->add(getString("grid_local_text"));
- break;
- case SELECT_TYPE_WORLD:
- mComboGridMode->add(getString("grid_world_text"));
- mComboGridMode->add(getString("grid_local_text"));
- mComboGridMode->add(getString("grid_reference_text"));
- break;
- case SELECT_TYPE_ATTACHMENT:
- mComboGridMode->add(getString("grid_attachment_text"));
- mComboGridMode->add(getString("grid_local_text"));
- mComboGridMode->add(getString("grid_reference_text"));
- break;
- }
-
- mComboGridMode->setCurrentByIndex(index);
- }
-}
-
// virtual
void LLFloaterBuildOptions::onOpen(const LLSD& key)
{
@@ -105,10 +65,3 @@ void LLFloaterBuildOptions::onClose(bool app_quitting)
{
mObjectSelection = NULL;
}
-
-void commit_grid_mode(LLUICtrl *ctrl)
-{
- LLComboBox* combo = (LLComboBox*)ctrl;
-
- LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
-}
diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h
index 7f3811bf1c..02c56cb6a9 100644
--- a/indra/newview/llfloaterbuildoptions.h
+++ b/indra/newview/llfloaterbuildoptions.h
@@ -35,7 +35,6 @@
#include "llfloater.h"
#include "llselectmgr.h"
-class LLComboBox;
class LLObjectSelection;
typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle;
@@ -44,23 +43,17 @@ class LLFloaterBuildOptions
: public LLFloater
{
public:
-
virtual BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
- void setGridMode(EGridMode mode);
- void updateGridMode();
-
private:
-
friend class LLFloaterReg;
LLFloaterBuildOptions(const LLSD& key);
~LLFloaterBuildOptions();
- LLComboBox* mComboGridMode;
LLObjectSelectionHandle mObjectSelection;
};
#endif
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index ee8487b160..087b0007e1 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -239,8 +239,9 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
// Compute icon for this item
BOOL item_is_multi = FALSE;
- if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
+ if (( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
|| inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
+ && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
{
item_is_multi = TRUE;
}
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index 2a3512e21a..b050a638dc 100644
--- a/indra/newview/llfloateranimpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -1,6 +1,6 @@
/**
- * @file llfloateranimpreview.cpp
- * @brief LLFloaterAnimPreview class implementation
+ * @file llfloaterbvhpreview.cpp
+ * @brief LLFloaterBvhPreview class implementation
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -26,7 +26,7 @@
#include "llviewerprecompiledheaders.h"
-#include "llfloateranimpreview.h"
+#include "llfloaterbvhpreview.h"
#include "llbvhloader.h"
#include "lldatapacker.h"
@@ -115,9 +115,9 @@ std::string STATUS[] =
};
//-----------------------------------------------------------------------------
-// LLFloaterAnimPreview()
+// LLFloaterBvhPreview()
//-----------------------------------------------------------------------------
-LLFloaterAnimPreview::LLFloaterAnimPreview(const std::string& filename) :
+LLFloaterBvhPreview::LLFloaterBvhPreview(const std::string& filename) :
LLFloaterNameDesc(filename)
{
mLastMouseX = 0;
@@ -153,35 +153,35 @@ LLFloaterAnimPreview::LLFloaterAnimPreview(const std::string& filename) :
//-----------------------------------------------------------------------------
// setAnimCallbacks()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::setAnimCallbacks()
+void LLFloaterBvhPreview::setAnimCallbacks()
{
- getChild<LLUICtrl>("playback_slider")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onSliderMove, this));
+ getChild<LLUICtrl>("playback_slider")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onSliderMove, this));
- getChild<LLUICtrl>("preview_base_anim")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitBaseAnim, this));
+ getChild<LLUICtrl>("preview_base_anim")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitBaseAnim, this));
getChild<LLUICtrl>("preview_base_anim")->setValue("Standing");
- getChild<LLUICtrl>("priority")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitPriority, this));
- getChild<LLUICtrl>("loop_check")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitLoop, this));
- getChild<LLUICtrl>("loop_in_point")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitLoopIn, this));
- getChild<LLUICtrl>("loop_in_point")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateLoopIn, this, _1));
- getChild<LLUICtrl>("loop_out_point")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitLoopOut, this));
- getChild<LLUICtrl>("loop_out_point")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateLoopOut, this, _1));
+ getChild<LLUICtrl>("priority")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitPriority, this));
+ getChild<LLUICtrl>("loop_check")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoop, this));
+ getChild<LLUICtrl>("loop_in_point")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoopIn, this));
+ getChild<LLUICtrl>("loop_in_point")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopIn, this, _1));
+ getChild<LLUICtrl>("loop_out_point")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoopOut, this));
+ getChild<LLUICtrl>("loop_out_point")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopOut, this, _1));
- getChild<LLUICtrl>("hand_pose_combo")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitHandPose, this));
+ getChild<LLUICtrl>("hand_pose_combo")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitHandPose, this));
- getChild<LLUICtrl>("emote_combo")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitEmote, this));
+ getChild<LLUICtrl>("emote_combo")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEmote, this));
getChild<LLUICtrl>("emote_combo")->setValue("[None]");
- getChild<LLUICtrl>("ease_in_time")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitEaseIn, this));
- getChild<LLUICtrl>("ease_in_time")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateEaseIn, this, _1));
- getChild<LLUICtrl>("ease_out_time")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitEaseOut, this));
- getChild<LLUICtrl>("ease_out_time")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateEaseOut, this, _1));
+ getChild<LLUICtrl>("ease_in_time")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEaseIn, this));
+ getChild<LLUICtrl>("ease_in_time")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateEaseIn, this, _1));
+ getChild<LLUICtrl>("ease_out_time")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEaseOut, this));
+ getChild<LLUICtrl>("ease_out_time")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateEaseOut, this, _1));
}
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::postBuild()
+BOOL LLFloaterBvhPreview::postBuild()
{
LLKeyframeMotion* motionp = NULL;
LLBVHLoader* loaderp = NULL;
@@ -191,7 +191,7 @@ BOOL LLFloaterAnimPreview::postBuild()
return FALSE;
}
- getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitName, this));
+ getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitName, this));
childSetAction("ok_btn", onBtnOK, this);
setDefaultBtn();
@@ -203,15 +203,15 @@ BOOL LLFloaterAnimPreview::postBuild()
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
mPlayButton = getChild<LLButton>( "play_btn");
- mPlayButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnPlay, this));
+ mPlayButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnPlay, this));
mPlayButton->setVisible(true);
mPauseButton = getChild<LLButton>( "pause_btn");
- mPauseButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnPause, this));
+ mPauseButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnPause, this));
mPauseButton->setVisible(false);
mStopButton = getChild<LLButton>( "stop_btn");
- mStopButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnStop, this));
+ mStopButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnStop, this));
getChildView("bad_animation_text")->setVisible(FALSE);
@@ -363,9 +363,9 @@ BOOL LLFloaterAnimPreview::postBuild()
}
//-----------------------------------------------------------------------------
-// LLFloaterAnimPreview()
+// LLFloaterBvhPreview()
//-----------------------------------------------------------------------------
-LLFloaterAnimPreview::~LLFloaterAnimPreview()
+LLFloaterBvhPreview::~LLFloaterBvhPreview()
{
mAnimPreview = NULL;
@@ -375,7 +375,7 @@ LLFloaterAnimPreview::~LLFloaterAnimPreview()
//-----------------------------------------------------------------------------
// draw()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::draw()
+void LLFloaterBvhPreview::draw()
{
LLFloater::draw();
LLRect r = getRect();
@@ -414,7 +414,7 @@ void LLFloaterAnimPreview::draw()
//-----------------------------------------------------------------------------
// resetMotion()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::resetMotion()
+void LLFloaterBvhPreview::resetMotion()
{
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
BOOL paused = avatarp->areAnimationsPaused();
@@ -450,7 +450,7 @@ void LLFloaterAnimPreview::resetMotion()
//-----------------------------------------------------------------------------
// handleMouseDown()
//-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::handleMouseDown(S32 x, S32 y, MASK mask)
+BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mPreviewRect.pointInRect(x, y))
{
@@ -468,7 +468,7 @@ BOOL LLFloaterAnimPreview::handleMouseDown(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleMouseUp()
//-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::handleMouseUp(S32 x, S32 y, MASK mask)
+BOOL LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
gFocusMgr.setMouseCapture(FALSE);
gViewerWindow->showCursor();
@@ -478,7 +478,7 @@ BOOL LLFloaterAnimPreview::handleMouseUp(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleHover()
//-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::handleHover(S32 x, S32 y, MASK mask)
+BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
{
MASK local_mask = mask & ~MASK_ALT;
@@ -533,7 +533,7 @@ BOOL LLFloaterAnimPreview::handleHover(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
+BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
mAnimPreview->zoom((F32)clicks * -0.2f);
mAnimPreview->requestUpdate();
@@ -544,7 +544,7 @@ BOOL LLFloaterAnimPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
//-----------------------------------------------------------------------------
// onMouseCaptureLost()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onMouseCaptureLost()
+void LLFloaterBvhPreview::onMouseCaptureLost()
{
gViewerWindow->showCursor();
}
@@ -552,7 +552,7 @@ void LLFloaterAnimPreview::onMouseCaptureLost()
//-----------------------------------------------------------------------------
// onBtnPlay()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onBtnPlay()
+void LLFloaterBvhPreview::onBtnPlay()
{
if (!getEnabled())
return;
@@ -576,7 +576,7 @@ void LLFloaterAnimPreview::onBtnPlay()
//-----------------------------------------------------------------------------
// onBtnPause()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onBtnPause()
+void LLFloaterBvhPreview::onBtnPause()
{
if (!getEnabled())
return;
@@ -598,7 +598,7 @@ void LLFloaterAnimPreview::onBtnPause()
//-----------------------------------------------------------------------------
// onBtnStop()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onBtnStop()
+void LLFloaterBvhPreview::onBtnStop()
{
if (!getEnabled())
return;
@@ -614,7 +614,7 @@ void LLFloaterAnimPreview::onBtnStop()
//-----------------------------------------------------------------------------
// onSliderMove()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onSliderMove()
+void LLFloaterBvhPreview::onSliderMove()
{
if (!getEnabled())
return;
@@ -639,7 +639,7 @@ void LLFloaterAnimPreview::onSliderMove()
//-----------------------------------------------------------------------------
// onCommitBaseAnim()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitBaseAnim()
+void LLFloaterBvhPreview::onCommitBaseAnim()
{
if (!getEnabled())
return;
@@ -668,7 +668,7 @@ void LLFloaterAnimPreview::onCommitBaseAnim()
//-----------------------------------------------------------------------------
// onCommitLoop()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitLoop()
+void LLFloaterBvhPreview::onCommitLoop()
{
if (!getEnabled())
return;
@@ -687,7 +687,7 @@ void LLFloaterAnimPreview::onCommitLoop()
//-----------------------------------------------------------------------------
// onCommitLoopIn()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitLoopIn()
+void LLFloaterBvhPreview::onCommitLoopIn()
{
if (!getEnabled())
return;
@@ -707,7 +707,7 @@ void LLFloaterAnimPreview::onCommitLoopIn()
//-----------------------------------------------------------------------------
// onCommitLoopOut()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitLoopOut()
+void LLFloaterBvhPreview::onCommitLoopOut()
{
if (!getEnabled())
return;
@@ -727,7 +727,7 @@ void LLFloaterAnimPreview::onCommitLoopOut()
//-----------------------------------------------------------------------------
// onCommitName()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitName()
+void LLFloaterBvhPreview::onCommitName()
{
if (!getEnabled())
return;
@@ -746,7 +746,7 @@ void LLFloaterAnimPreview::onCommitName()
//-----------------------------------------------------------------------------
// onCommitHandPose()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitHandPose()
+void LLFloaterBvhPreview::onCommitHandPose()
{
if (!getEnabled())
return;
@@ -757,7 +757,7 @@ void LLFloaterAnimPreview::onCommitHandPose()
//-----------------------------------------------------------------------------
// onCommitEmote()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitEmote()
+void LLFloaterBvhPreview::onCommitEmote()
{
if (!getEnabled())
return;
@@ -768,7 +768,7 @@ void LLFloaterAnimPreview::onCommitEmote()
//-----------------------------------------------------------------------------
// onCommitPriority()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitPriority()
+void LLFloaterBvhPreview::onCommitPriority()
{
if (!getEnabled())
return;
@@ -782,7 +782,7 @@ void LLFloaterAnimPreview::onCommitPriority()
//-----------------------------------------------------------------------------
// onCommitEaseIn()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitEaseIn()
+void LLFloaterBvhPreview::onCommitEaseIn()
{
if (!getEnabled())
return;
@@ -797,7 +797,7 @@ void LLFloaterAnimPreview::onCommitEaseIn()
//-----------------------------------------------------------------------------
// onCommitEaseOut()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onCommitEaseOut()
+void LLFloaterBvhPreview::onCommitEaseOut()
{
if (!getEnabled())
return;
@@ -812,7 +812,7 @@ void LLFloaterAnimPreview::onCommitEaseOut()
//-----------------------------------------------------------------------------
// validateEaseIn()
//-----------------------------------------------------------------------------
-bool LLFloaterAnimPreview::validateEaseIn(const LLSD& data)
+bool LLFloaterBvhPreview::validateEaseIn(const LLSD& data)
{
if (!getEnabled())
return false;
@@ -832,7 +832,7 @@ bool LLFloaterAnimPreview::validateEaseIn(const LLSD& data)
//-----------------------------------------------------------------------------
// validateEaseOut()
//-----------------------------------------------------------------------------
-bool LLFloaterAnimPreview::validateEaseOut(const LLSD& data)
+bool LLFloaterBvhPreview::validateEaseOut(const LLSD& data)
{
if (!getEnabled())
return false;
@@ -852,7 +852,7 @@ bool LLFloaterAnimPreview::validateEaseOut(const LLSD& data)
//-----------------------------------------------------------------------------
// validateLoopIn()
//-----------------------------------------------------------------------------
-bool LLFloaterAnimPreview::validateLoopIn(const LLSD& data)
+bool LLFloaterBvhPreview::validateLoopIn(const LLSD& data)
{
if (!getEnabled())
return false;
@@ -880,7 +880,7 @@ bool LLFloaterAnimPreview::validateLoopIn(const LLSD& data)
//-----------------------------------------------------------------------------
// validateLoopOut()
//-----------------------------------------------------------------------------
-bool LLFloaterAnimPreview::validateLoopOut(const LLSD& data)
+bool LLFloaterBvhPreview::validateLoopOut(const LLSD& data)
{
if (!getEnabled())
return false;
@@ -909,7 +909,7 @@ bool LLFloaterAnimPreview::validateLoopOut(const LLSD& data)
//-----------------------------------------------------------------------------
// refresh()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::refresh()
+void LLFloaterBvhPreview::refresh()
{
// Are we showing the play button (default) or the pause button?
bool show_play = true;
@@ -958,9 +958,9 @@ void LLFloaterAnimPreview::refresh()
//-----------------------------------------------------------------------------
// onBtnOK()
//-----------------------------------------------------------------------------
-void LLFloaterAnimPreview::onBtnOK(void* userdata)
+void LLFloaterBvhPreview::onBtnOK(void* userdata)
{
- LLFloaterAnimPreview* floaterp = (LLFloaterAnimPreview*)userdata;
+ LLFloaterBvhPreview* floaterp = (LLFloaterBvhPreview*)userdata;
if (!floaterp->getEnabled()) return;
if (floaterp->mAnimPreview)
diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloaterbvhpreview.h
index f1ffb6547f..b81cc6e3a5 100644
--- a/indra/newview/llfloateranimpreview.h
+++ b/indra/newview/llfloaterbvhpreview.h
@@ -1,6 +1,6 @@
/**
- * @file llfloateranimpreview.h
- * @brief LLFloaterAnimPreview class definition
+ * @file llfloaterbvhpreview.h
+ * @brief LLFloaterBvhPreview class definition
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -24,14 +24,15 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLFLOATERANIMPREVIEW_H
-#define LL_LLFLOATERANIMPREVIEW_H
+#ifndef LL_LLFLOATERBVHPREVIEW_H
+#define LL_LLFLOATERBVHPREVIEW_H
#include "llassettype.h"
#include "llfloaternamedesc.h"
#include "lldynamictexture.h"
#include "llcharacter.h"
#include "llquaternion.h"
+#include "llextendedstatus.h"
class LLVOAvatar;
class LLViewerJointMesh;
@@ -67,11 +68,11 @@ protected:
LLPointer<LLVOAvatar> mDummyAvatar;
};
-class LLFloaterAnimPreview : public LLFloaterNameDesc
+class LLFloaterBvhPreview : public LLFloaterNameDesc
{
public:
- LLFloaterAnimPreview(const std::string& filename);
- virtual ~LLFloaterAnimPreview();
+ LLFloaterBvhPreview(const std::string& filename);
+ virtual ~LLFloaterBvhPreview();
BOOL postBuild();
@@ -128,4 +129,4 @@ protected:
std::map<std::string, LLUUID> mIDList;
};
-#endif // LL_LLFLOATERANIMPREVIEW_H
+#endif // LL_LLFLOATERBVHPREVIEW_H
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
index abee7b5dc9..352361ce9e 100644
--- a/indra/newview/llfloatereditsky.cpp
+++ b/indra/newview/llfloatereditsky.cpp
@@ -151,8 +151,8 @@ void LLFloaterEditSky::initCallbacks(void)
getChild<LLUICtrl>("WLBlueHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &param_mgr.mBlueHorizon));
// haze density, horizon, mult, and altitude
- getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &param_mgr.mHazeDensity));
- getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &param_mgr.mHazeHorizon));
+ getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mHazeDensity));
+ getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mHazeHorizon));
getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mDensityMult));
getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &param_mgr.mMaxAlt));
@@ -220,15 +220,14 @@ void LLFloaterEditSky::syncControls()
setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE);
// haze density, horizon, mult, and altitude
- param_mgr->mHazeDensity = cur_params.getVector(param_mgr->mHazeDensity.mName, err);
- childSetValue("WLHazeDensity", param_mgr->mHazeDensity.r);
- param_mgr->mHazeHorizon = cur_params.getVector(param_mgr->mHazeHorizon.mName, err);
- childSetValue("WLHazeHorizon", param_mgr->mHazeHorizon.r);
- param_mgr->mDensityMult = cur_params.getVector(param_mgr->mDensityMult.mName, err);
- childSetValue("WLDensityMult", param_mgr->mDensityMult.x *
- param_mgr->mDensityMult.mult);
- param_mgr->mMaxAlt = cur_params.getVector(param_mgr->mMaxAlt.mName, err);
- childSetValue("WLMaxAltitude", param_mgr->mMaxAlt.x);
+ param_mgr->mHazeDensity = cur_params.getFloat(param_mgr->mHazeDensity.mName, err);
+ childSetValue("WLHazeDensity", (F32) param_mgr->mHazeDensity);
+ param_mgr->mHazeHorizon = cur_params.getFloat(param_mgr->mHazeHorizon.mName, err);
+ childSetValue("WLHazeHorizon", (F32) param_mgr->mHazeHorizon);
+ param_mgr->mDensityMult = cur_params.getFloat(param_mgr->mDensityMult.mName, err);
+ childSetValue("WLDensityMult", ((F32) param_mgr->mDensityMult) * param_mgr->mDensityMult.mult);
+ param_mgr->mMaxAlt = cur_params.getFloat(param_mgr->mMaxAlt.mName, err);
+ childSetValue("WLMaxAltitude", (F32) param_mgr->mMaxAlt);
// blue density
param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err);
@@ -273,10 +272,10 @@ void LLFloaterEditSky::syncControls()
childSetValue("WLCloudDetailDensity", param_mgr->mCloudDetail.b);
// Cloud extras
- param_mgr->mCloudCoverage = cur_params.getVector(param_mgr->mCloudCoverage.mName, err);
- param_mgr->mCloudScale = cur_params.getVector(param_mgr->mCloudScale.mName, err);
- childSetValue("WLCloudCoverage", param_mgr->mCloudCoverage.x);
- childSetValue("WLCloudScale", param_mgr->mCloudScale.x);
+ param_mgr->mCloudCoverage = cur_params.getFloat(param_mgr->mCloudCoverage.mName, err);
+ param_mgr->mCloudScale = cur_params.getFloat(param_mgr->mCloudScale.mName, err);
+ childSetValue("WLCloudCoverage", (F32) param_mgr->mCloudCoverage);
+ childSetValue("WLCloudScale", (F32) param_mgr->mCloudScale);
// cloud scrolling
bool lockX = !param_mgr->mCurParams.getEnableCloudScrollX();
@@ -306,13 +305,13 @@ void LLFloaterEditSky::syncControls()
childSetValue("WLCloudScrollX", param_mgr->mCurParams.getCloudScrollX() - 10.0f);
childSetValue("WLCloudScrollY", param_mgr->mCurParams.getCloudScrollY() - 10.0f);
- param_mgr->mDistanceMult = cur_params.getVector(param_mgr->mDistanceMult.mName, err);
- childSetValue("WLDistanceMult", param_mgr->mDistanceMult.x);
+ param_mgr->mDistanceMult = cur_params.getFloat(param_mgr->mDistanceMult.mName, err);
+ childSetValue("WLDistanceMult", (F32) param_mgr->mDistanceMult);
// Tweak extras
- param_mgr->mWLGamma = cur_params.getVector(param_mgr->mWLGamma.mName, err);
- childSetValue("WLGamma", param_mgr->mWLGamma.x);
+ param_mgr->mWLGamma = cur_params.getFloat(param_mgr->mWLGamma.mName, err);
+ childSetValue("WLGamma", (F32) param_mgr->mWLGamma);
childSetValue("WLStarAlpha", param_mgr->mCurParams.getStarBrightness());
}
diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index 895e16adef..4f2a6ec1b7 100644
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -312,3 +312,9 @@ bool LLFloaterMediaSettings::haveValuesChanged() const
return values_changed;
}
+bool LLFloaterMediaSettings::instanceExists()
+{
+ return LLFloaterReg::findTypedInstance<LLFloaterMediaSettings>("media_settings");
+}
+
+
diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h
index ecc55d2cbc..1d25530986 100644
--- a/indra/newview/llfloatermediasettings.h
+++ b/indra/newview/llfloatermediasettings.h
@@ -45,6 +45,7 @@ public:
/*virtual*/ void onClose(bool app_quitting);
static LLFloaterMediaSettings* getInstance();
+ static bool instanceExists();
static void apply();
static void initValues( const LLSD& media_settings , bool editable);
static void clearValues( bool editable);
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 9122e5a8f5..7448f2bb2a 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -4525,7 +4525,17 @@ void LLModelPreview::updateStatusMessages()
}
}
- if (mFMP->childGetValue("physics_lod_combo").asString() == "From file")
+
+ LLCtrlSelectionInterface* iface = fmp->childGetSelectionInterface("physics_lod_combo");
+ S32 which_mode = 0;
+ S32 file_mode = 1;
+ if (iface)
+ {
+ which_mode = iface->getFirstSelectedIndex();
+ file_mode = iface->getItemCount() - 1;
+ }
+
+ if (which_mode == file_mode)
{
mFMP->childEnable("physics_file");
mFMP->childEnable("physics_browse");
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index 66f0fc3cd7..27b1c3b9cd 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -207,6 +207,25 @@ BOOL LLFloaterSoundPreview::postBuild()
//-----------------------------------------------------------------------------
+// LLFloaterAnimPreview()
+//-----------------------------------------------------------------------------
+
+LLFloaterAnimPreview::LLFloaterAnimPreview(const LLSD& filename )
+ : LLFloaterNameDesc(filename)
+{
+}
+
+BOOL LLFloaterAnimPreview::postBuild()
+{
+ if (!LLFloaterNameDesc::postBuild())
+ {
+ return FALSE;
+ }
+ getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
+ return TRUE;
+}
+
+//-----------------------------------------------------------------------------
// LLFloaterScriptPreview()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h
index 69bbccaf80..41643681ac 100644
--- a/indra/newview/llfloaternamedesc.h
+++ b/indra/newview/llfloaternamedesc.h
@@ -64,6 +64,13 @@ public:
virtual BOOL postBuild();
};
+class LLFloaterAnimPreview : public LLFloaterNameDesc
+{
+public:
+ LLFloaterAnimPreview(const LLSD& filename );
+ virtual BOOL postBuild();
+};
+
class LLFloaterScriptPreview : public LLFloaterNameDesc
{
public:
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index a333989e7e..173b0e538c 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -741,7 +741,8 @@ void LLFloaterPreference::onClose(bool app_quitting)
void LLFloaterPreference::onOpenHardwareSettings()
{
- LLFloaterReg::showInstance("prefs_hardware_settings");
+ LLFloater* floater = LLFloaterReg::showInstance("prefs_hardware_settings");
+ addDependentFloater(floater, FALSE);
}
// static
void LLFloaterPreference::onBtnOK()
@@ -1800,7 +1801,46 @@ void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
}
}
+class LLPanelPreferencePrivacy : public LLPanelPreference
+{
+public:
+ LLPanelPreferencePrivacy()
+ {
+ mAccountIndependentSettings.push_back("VoiceCallsFriendsOnly");
+ mAccountIndependentSettings.push_back("AutoDisengageMic");
+ }
+
+ /*virtual*/ void saveSettings()
+ {
+ LLPanelPreference::saveSettings();
+
+ // Don't save (=erase from the saved values map) per-account privacy settings
+ // if we're not logged in, otherwise they will be reset to defaults on log off.
+ if (LLStartUp::getStartupState() != STATE_STARTED)
+ {
+ // Erase only common settings, assuming there are no color settings on Privacy page.
+ for (control_values_map_t::iterator it = mSavedValues.begin(); it != mSavedValues.end(); )
+ {
+ const std::string setting = it->first->getName();
+ if (std::find(mAccountIndependentSettings.begin(),
+ mAccountIndependentSettings.end(), setting) == mAccountIndependentSettings.end())
+ {
+ mSavedValues.erase(it++);
+ }
+ else
+ {
+ ++it;
+ }
+ }
+ }
+ }
+
+private:
+ std::list<std::string> mAccountIndependentSettings;
+};
+
static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
+static LLRegisterPanelClassWrapper<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy");
BOOL LLPanelPreferenceGraphics::postBuild()
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 7ee3294478..ec5994e917 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -198,15 +198,17 @@ public:
virtual void saveSettings();
class Updater;
+
+protected:
+ typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
+ control_values_map_t mSavedValues;
+
private:
//for "Only friends and groups can call or IM me"
static void showFriendsOnlyWarning(LLUICtrl*, const LLSD&);
//for "Show my Favorite Landmarks at Login"
static void showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LLSD& value);
- typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
- control_values_map_t mSavedValues;
-
typedef std::map<std::string, LLColor4> string_color_map_t;
string_color_map_t mSavedColors;
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index c402de66e8..ae45949b4a 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -33,6 +33,7 @@
#include "llfloater.h"
#include "llhost.h"
#include "llpanel.h"
+#include "llextendedstatus.h"
#include "llenvmanager.h" // for LLEnvironmentSettings
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index cd98f7be57..7d68431710 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -31,6 +31,7 @@
#include "llfloater.h"
#include "lluuid.h"
#include "v3math.h"
+#include "llextendedstatus.h"
class LLAvatarName;
class LLMessageSystem;
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index a0d1a32e12..b691db1049 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -106,7 +106,11 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
if (objectp)
{
objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI));
- floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]);
+ floater_label = llformat("%s(%.0f, %.0f, %.0f)",
+ user_name.c_str(),
+ objectp->getPositionRegion().mV[VX],
+ objectp->getPositionRegion().mV[VY],
+ objectp->getPositionRegion().mV[VZ]);
}
else
{
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index be7a53491d..5385977d95 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -59,7 +59,10 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
LLView* view = findChildView(panel_name, true);
if (!view) return NULL;
- openFloater();
+ if (!getVisible())
+ {
+ openFloater();
+ }
LLPanel* panel = NULL;
diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp
new file mode 100644
index 0000000000..2b34b72055
--- /dev/null
+++ b/indra/newview/llfloatertexturefetchdebugger.cpp
@@ -0,0 +1,390 @@
+/**
+ * @file llfloatertexturefetchdebugger.cpp
+ * @brief LLFloaterTextureFetchDebugger class definition
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatertexturefetchdebugger.h"
+
+#include "lluictrlfactory.h"
+#include "llbutton.h"
+#include "llspinctrl.h"
+#include "llresmgr.h"
+
+#include "llmath.h"
+#include "llviewerwindow.h"
+#include "llappviewer.h"
+#include "lltexturefetch.h"
+#include "llviewercontrol.h"
+
+LLFloaterTextureFetchDebugger::LLFloaterTextureFetchDebugger(const LLSD& key)
+ : LLFloater(key),
+ mDebugger(NULL)
+{
+ setTitle("Texture Fetching Debugger Floater");
+
+ mCommitCallbackRegistrar.add("TexFetchDebugger.ChangeTexelPixelRatio", boost::bind(&LLFloaterTextureFetchDebugger::onChangeTexelPixelRatio, this));
+
+ mCommitCallbackRegistrar.add("TexFetchDebugger.Start", boost::bind(&LLFloaterTextureFetchDebugger::onClickStart, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.Clear", boost::bind(&LLFloaterTextureFetchDebugger::onClickClear, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.Close", boost::bind(&LLFloaterTextureFetchDebugger::onClickClose, this));
+
+ mCommitCallbackRegistrar.add("TexFetchDebugger.CacheRead", boost::bind(&LLFloaterTextureFetchDebugger::onClickCacheRead, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.CacheWrite", boost::bind(&LLFloaterTextureFetchDebugger::onClickCacheWrite, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.HTTPLoad", boost::bind(&LLFloaterTextureFetchDebugger::onClickHTTPLoad, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.Decode", boost::bind(&LLFloaterTextureFetchDebugger::onClickDecode, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.GLTexture", boost::bind(&LLFloaterTextureFetchDebugger::onClickGLTexture, this));
+
+ mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisCache", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisCache, this));
+ mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisHTTP", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP, this));
+}
+//----------------------------------------------
+
+BOOL LLFloaterTextureFetchDebugger::postBuild(void)
+{
+ mDebugger = LLAppViewer::getTextureFetch()->getFetchDebugger();
+
+ //set states for buttons
+ mButtonStateMap["start_btn"] = true;
+ mButtonStateMap["close_btn"] = true;
+ mButtonStateMap["clear_btn"] = true;
+ mButtonStateMap["cacheread_btn"] = false;
+ mButtonStateMap["cachewrite_btn"] = false;
+ mButtonStateMap["http_btn"] = false;
+ mButtonStateMap["decode_btn"] = false;
+ mButtonStateMap["gl_btn"] = false;
+
+ mButtonStateMap["refetchviscache_btn"] = true;
+ mButtonStateMap["refetchvishttp_btn"] = true;
+
+ updateButtons();
+
+ getChild<LLUICtrl>("texel_pixel_ratio")->setValue(gSavedSettings.getF32("TexelPixelRatio"));
+
+ return TRUE ;
+}
+
+LLFloaterTextureFetchDebugger::~LLFloaterTextureFetchDebugger()
+{
+ //stop everything
+ mDebugger->stopDebug();
+}
+
+void LLFloaterTextureFetchDebugger::updateButtons()
+{
+ for(std::map<std::string, bool>::iterator iter = mButtonStateMap.begin(); iter != mButtonStateMap.end(); ++iter)
+ {
+ if(iter->second)
+ {
+ childEnable(iter->first.c_str());
+ }
+ else
+ {
+ childDisable(iter->first.c_str());
+ }
+ }
+}
+
+void LLFloaterTextureFetchDebugger::disableButtons()
+{
+ childDisable("start_btn");
+ childDisable("clear_btn");
+ childDisable("cacheread_btn");
+ childDisable("cachewrite_btn");
+ childDisable("http_btn");
+ childDisable("decode_btn");
+ childDisable("gl_btn");
+ childDisable("refetchviscache_btn");
+ childDisable("refetchvishttp_btn");
+}
+
+void LLFloaterTextureFetchDebugger::idle()
+{
+ LLTextureFetchDebugger::e_debug_state state = mDebugger->getState();
+
+ if(mDebugger->update())
+ {
+ switch(state)
+ {
+ case LLTextureFetchDebugger::IDLE:
+ break;
+ case LLTextureFetchDebugger::READ_CACHE:
+ mButtonStateMap["cachewrite_btn"] = true;
+ mButtonStateMap["decode_btn"] = true;
+ updateButtons();
+ break;
+ case LLTextureFetchDebugger::WRITE_CACHE:
+ updateButtons();
+ break;
+ case LLTextureFetchDebugger::DECODING:
+ mButtonStateMap["gl_btn"] = true;
+ updateButtons();
+ break;
+ case LLTextureFetchDebugger::HTTP_FETCHING:
+ mButtonStateMap["cacheread_btn"] = true;
+ mButtonStateMap["cachewrite_btn"] = true;
+ mButtonStateMap["decode_btn"] = true;
+ updateButtons();
+ break;
+ case LLTextureFetchDebugger::GL_TEX:
+ updateButtons();
+ break;
+ case LLTextureFetchDebugger::REFETCH_VIS_CACHE:
+ updateButtons();
+ case LLTextureFetchDebugger::REFETCH_VIS_HTTP:
+ updateButtons();
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+//----------------------
+void LLFloaterTextureFetchDebugger::onChangeTexelPixelRatio()
+{
+ gSavedSettings.setF32("TexelPixelRatio", getChild<LLUICtrl>("texel_pixel_ratio")->getValue().asReal());
+}
+
+void LLFloaterTextureFetchDebugger::onClickStart()
+{
+ disableButtons();
+
+ mDebugger->startDebug();
+
+ mButtonStateMap["start_btn"] = false;
+ mButtonStateMap["cacheread_btn"] = true;
+ mButtonStateMap["http_btn"] = true;
+ updateButtons();
+}
+
+void LLFloaterTextureFetchDebugger::onClickClose()
+{
+ setVisible(FALSE);
+
+ //stop everything
+ mDebugger->stopDebug();
+}
+
+void LLFloaterTextureFetchDebugger::onClickClear()
+{
+ mButtonStateMap["start_btn"] = true;
+ mButtonStateMap["close_btn"] = true;
+ mButtonStateMap["clear_btn"] = true;
+ mButtonStateMap["cacheread_btn"] = false;
+ mButtonStateMap["cachewrite_btn"] = false;
+ mButtonStateMap["http_btn"] = false;
+ mButtonStateMap["decode_btn"] = false;
+ mButtonStateMap["gl_btn"] = false;
+ mButtonStateMap["refetchviscache_btn"] = true;
+ mButtonStateMap["refetchvishttp_btn"] = true;
+ updateButtons();
+
+ //stop everything
+ mDebugger->stopDebug();
+ mDebugger->clearHistory();
+}
+
+void LLFloaterTextureFetchDebugger::onClickCacheRead()
+{
+ disableButtons();
+
+ mDebugger->debugCacheRead();
+}
+
+void LLFloaterTextureFetchDebugger::onClickCacheWrite()
+{
+ disableButtons();
+
+ mDebugger->debugCacheWrite();
+}
+
+void LLFloaterTextureFetchDebugger::onClickHTTPLoad()
+{
+ disableButtons();
+
+ mDebugger->debugHTTP();
+}
+
+void LLFloaterTextureFetchDebugger::onClickDecode()
+{
+ disableButtons();
+
+ mDebugger->debugDecoder();
+}
+
+void LLFloaterTextureFetchDebugger::onClickGLTexture()
+{
+ disableButtons();
+
+ mDebugger->debugGLTextureCreation();
+}
+
+void LLFloaterTextureFetchDebugger::onClickRefetchVisCache()
+{
+ disableButtons();
+
+ mDebugger->debugRefetchVisibleFromCache();
+}
+
+void LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP()
+{
+ disableButtons();
+
+ mDebugger->debugRefetchVisibleFromHTTP();
+}
+
+void LLFloaterTextureFetchDebugger::draw()
+{
+ //total number of fetched textures
+ {
+ getChild<LLUICtrl>("total_num_fetched_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumFetchedTextures()));
+ }
+
+ //total number of fetching requests
+ {
+ getChild<LLUICtrl>("total_num_fetching_requests_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumFetchingRequests()));
+ }
+
+ //total number of cache hits
+ {
+ getChild<LLUICtrl>("total_num_cache_hits_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumCacheHits()));
+ }
+
+ //total number of visible textures
+ {
+ getChild<LLUICtrl>("total_num_visible_tex_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumVisibleFetchedTextures()));
+ }
+
+ //total number of visible texture fetching requests
+ {
+ getChild<LLUICtrl>("total_num_visible_tex_fetch_req_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumVisibleFetchingRequests()));
+ }
+
+ //total number of fetched data
+ {
+ getChild<LLUICtrl>("total_fetched_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getFetchedData() >> 10));
+ getChild<LLUICtrl>("total_fetched_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getDecodedData() >> 10));
+ getChild<LLUICtrl>("total_fetched_data_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getFetchedPixels() / 1000000.f));
+ }
+
+ //total number of visible fetched data
+ {
+ getChild<LLUICtrl>("total_fetched_vis_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getVisibleFetchedData() >> 10));
+ getChild<LLUICtrl>("total_fetched_vis_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getVisibleDecodedData() >> 10));
+ }
+
+ //total number of rendered fetched data
+ {
+ getChild<LLUICtrl>("total_fetched_rendered_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getRenderedData() >> 10));
+ getChild<LLUICtrl>("total_fetched_rendered_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getRenderedDecodedData() >> 10));
+ getChild<LLUICtrl>("total_fetched_rendered_data_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRenderedPixels() / 1000000.f));
+ }
+
+ //total time on cache readings
+ if(mDebugger->getCacheReadTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_cache_read_label")->setTextArg("[TIME]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_cache_read_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getCacheReadTime()));
+ }
+
+ //total time on cache writings
+ if(mDebugger->getCacheWriteTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_cache_write_label")->setTextArg("[TIME]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_cache_write_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getCacheWriteTime()));
+ }
+
+ //total time on decoding
+ if(mDebugger->getDecodeTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_decode_label")->setTextArg("[TIME]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_decode_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getDecodeTime()));
+ }
+
+ //total time on gl texture creation
+ if(mDebugger->getGLCreationTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_gl_label")->setTextArg("[TIME]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_gl_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getGLCreationTime()));
+ }
+
+ //total time on HTTP fetching
+ if(mDebugger->getHTTPTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_http_label")->setTextArg("[TIME]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getHTTPTime()));
+ }
+
+ //total time on entire fetching
+ {
+ getChild<LLUICtrl>("total_time_fetch_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getTotalFetchingTime()));
+ }
+
+ //total time on refetching visible textures from cache
+ if(mDebugger->getRefetchVisCacheTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[TIME]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisCacheTime()));
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10));
+ getChild<LLUICtrl>("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f));
+ }
+
+ //total time on refetching visible textures from http
+ if(mDebugger->getRefetchVisHTTPTime() < 0.f)
+ {
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[TIME]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", std::string("----"));
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", std::string("----"));
+ }
+ else
+ {
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisHTTPTime()));
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10));
+ getChild<LLUICtrl>("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f));
+ }
+
+ LLFloater::draw();
+}
diff --git a/indra/newview/llfloatertexturefetchdebugger.h b/indra/newview/llfloatertexturefetchdebugger.h
new file mode 100644
index 0000000000..33012c6a3d
--- /dev/null
+++ b/indra/newview/llfloatertexturefetchdebugger.h
@@ -0,0 +1,71 @@
+/**
+ * @file llfloatertexturefetchdebugger.h
+ * @brief texture fetching debugger window, debug use only
+ *
+ * $LicenseInfo:firstyear=2004&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H
+#define LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H
+
+#include "llfloater.h"
+class LLTextureFetchDebugger;
+
+class LLFloaterTextureFetchDebugger : public LLFloater
+{
+ friend class LLFloaterReg;
+public:
+ /// initialize all the callbacks for the menu
+
+ virtual BOOL postBuild() ;
+ virtual void draw() ;
+
+ void onChangeTexelPixelRatio();
+
+ void onClickStart();
+ void onClickClear();
+ void onClickClose();
+
+ void onClickCacheRead();
+ void onClickCacheWrite();
+ void onClickHTTPLoad();
+ void onClickDecode();
+ void onClickGLTexture();
+
+ void onClickRefetchVisCache();
+ void onClickRefetchVisHTTP();
+public:
+ void idle() ;
+
+private:
+ LLFloaterTextureFetchDebugger(const LLSD& key);
+ virtual ~LLFloaterTextureFetchDebugger();
+
+ void updateButtons();
+ void disableButtons();
+
+private:
+ LLTextureFetchDebugger* mDebugger;
+ std::map<std::string, bool> mButtonStateMap;
+};
+
+#endif // LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index bd5b5f4eb0..6978e6a430 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -36,6 +36,7 @@
#include "llagentcamera.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
+#include "llcombobox.h"
#include "lldraghandle.h"
#include "llerror.h"
#include "llfloaterbuildoptions.h"
@@ -103,6 +104,7 @@ const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] =
// Local prototypes
+void commit_grid_mode(LLUICtrl *ctrl);
void commit_select_component(void *data);
void click_show_more(void*);
void click_popup_info(void*);
@@ -252,6 +254,7 @@ BOOL LLFloaterTools::postBuild()
getChild<LLUICtrl>("checkbox uniform")->setValue((BOOL)gSavedSettings.getBOOL("ScaleUniform"));
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
getChild<LLUICtrl>("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
+ mComboGridMode = getChild<LLComboBox>("combobox grid mode");
mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label");
//
@@ -330,6 +333,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCheckSnapToGrid(NULL),
mBtnGridOptions(NULL),
mTitleMedia(NULL),
+ mComboGridMode(NULL),
mCheckStretchUniform(NULL),
mCheckStretchTexture(NULL),
mCheckStretchUniformLabel(NULL),
@@ -386,6 +390,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCommitCallbackRegistrar.add("BuildTool.commitRadioMove", boost::bind(&commit_radio_group_move,_1));
mCommitCallbackRegistrar.add("BuildTool.commitRadioEdit", boost::bind(&commit_radio_group_edit,_1));
+ mCommitCallbackRegistrar.add("BuildTool.gridMode", boost::bind(&commit_grid_mode,_1));
mCommitCallbackRegistrar.add("BuildTool.selectComponent", boost::bind(&commit_select_component, this));
mCommitCallbackRegistrar.add("BuildTool.gridOptions", boost::bind(&LLFloaterTools::onClickGridOptions,this));
mCommitCallbackRegistrar.add("BuildTool.applyToSelection", boost::bind(&click_apply_to_selection, this));
@@ -687,6 +692,33 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
mRadioGroupEdit->setValue("radio select face");
}
+ if (mComboGridMode)
+ {
+ mComboGridMode->setVisible( edit_visible );
+ S32 index = mComboGridMode->getCurrentIndex();
+ mComboGridMode->removeall();
+
+ switch (mObjectSelection->getSelectType())
+ {
+ case SELECT_TYPE_HUD:
+ mComboGridMode->add(getString("grid_screen_text"));
+ mComboGridMode->add(getString("grid_local_text"));
+ break;
+ case SELECT_TYPE_WORLD:
+ mComboGridMode->add(getString("grid_world_text"));
+ mComboGridMode->add(getString("grid_local_text"));
+ mComboGridMode->add(getString("grid_reference_text"));
+ break;
+ case SELECT_TYPE_ATTACHMENT:
+ mComboGridMode->add(getString("grid_attachment_text"));
+ mComboGridMode->add(getString("grid_local_text"));
+ mComboGridMode->add(getString("grid_reference_text"));
+ break;
+ }
+
+ mComboGridMode->setCurrentByIndex(index);
+ }
+
// Snap to grid disabled for grab tool - very confusing
if (mCheckSnapToGrid) mCheckSnapToGrid->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ );
if (mBtnGridOptions) mBtnGridOptions->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ );
@@ -1037,6 +1069,13 @@ void LLFloaterTools::setObjectType( LLPCode pcode )
gFocusMgr.setMouseCapture(NULL);
}
+void commit_grid_mode(LLUICtrl *ctrl)
+{
+ LLComboBox* combo = (LLComboBox*)ctrl;
+
+ LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
+}
+
void LLFloaterTools::onClickGridOptions()
{
@@ -1144,7 +1183,7 @@ void LLFloaterTools::updateLandImpacts()
childSetTextArg("remaining_capacity", "[CAPACITY_STRING]", remaining_capacity_str);
// Update land impacts info in the weights floater
- LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::getTypedInstance<LLFloaterObjectWeights>("object_weights");
+ LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::findTypedInstance<LLFloaterObjectWeights>("object_weights");
if(object_weights_floater)
{
object_weights_floater->updateLandImpacts(parcel);
@@ -1234,6 +1273,7 @@ void LLFloaterTools::getMediaState()
}
} func;
+
// check if all faces have media(or, all dont have media)
LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo = selected_objects->getSelectedTEValue( &func, bool_has_media );
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index 63ed9dc82b..7a19d093a4 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -33,6 +33,7 @@
class LLButton;
class LLCheckBoxCtrl;
+class LLComboBox;
class LLPanelPermissions;
class LLPanelObject;
class LLPanelVolume;
@@ -140,6 +141,7 @@ public:
LLCheckBoxCtrl* mCheckSnapToGrid;
LLButton* mBtnGridOptions;
+ LLComboBox* mComboGridMode;
LLCheckBoxCtrl* mCheckStretchUniform;
LLCheckBoxCtrl* mCheckStretchTexture;
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
index 428a02e9f0..1a17183efd 100644
--- a/indra/newview/llfloatertranslationsettings.cpp
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -293,6 +293,6 @@ void LLFloaterTranslationSettings::onBtnOK()
gSavedSettings.setString("TranslationService", getSelectedService());
gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());
gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey());
- LLNearbyChatBar::getInstance()->enableTranslationCheckbox(LLTranslate::isTranslationConfigured());
+ LLNearbyChatBar::getInstance()->showTranslationCheckbox(LLTranslate::isTranslationConfigured());
closeFloater(false);
}
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index e0d7d67f7d..86001e4146 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -255,7 +255,7 @@ LLFolderView::LLFolderView(const Params& p)
LLRect new_r = LLRect(rect.mLeft + ICON_PAD,
rect.mTop - TEXT_PAD,
rect.mRight,
- rect.mTop - TEXT_PAD - llfloor(font->getLineHeight()));
+ rect.mTop - TEXT_PAD - font->getLineHeight());
text_p.rect(new_r);
text_p.name(std::string(p.name));
text_p.font(font);
@@ -388,7 +388,7 @@ void LLFolderView::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse
static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange");
-// This view grows and shinks to enclose all of its children items and folders.
+// This view grows and shrinks to enclose all of its children items and folders.
S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_generation )
{
if (getListener()->getUUID().notNull())
@@ -414,7 +414,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
getRoot()->getFilter()->getShowFolderState();
S32 total_width = LEFT_PAD;
- S32 running_height = mDebugFilters ? llceil(LLFontGL::getFontMonospace()->getLineHeight()) : 0;
+ S32 running_height = mDebugFilters ? LLFontGL::getFontMonospace()->getLineHeight() : 0;
S32 target_height = running_height;
S32 parent_item_height = getRect().getHeight();
@@ -527,15 +527,15 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
LLView::reshape(width, height, called_from_parent);
scroll_rect = mScrollContainer->getContentWindowRect();
}
- width = llmax(mMinWidth, scroll_rect.getWidth());
+ width = llmax(mMinWidth, scroll_rect.getWidth());
height = llmax(mRunningHeight, scroll_rect.getHeight());
- // restrict width with scroll container's width
- if (mUseEllipses)
+ // Restrict width within scroll container's width
+ if (mUseEllipses && mScrollContainer)
+ {
width = scroll_rect.getWidth();
-
+ }
LLView::reshape(width, height, called_from_parent);
-
mReshapeSignal(mSelectedItems, FALSE);
}
@@ -912,7 +912,7 @@ void LLFolderView::draw()
}
else if (mShowEmptyMessage)
{
- if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration())
+ if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration())
{
mStatusText = LLTrans::getString("Searching");
}
@@ -1966,7 +1966,7 @@ void LLFolderView::scrollToShowSelection()
// However we allow scrolling for folder views with mAutoSelectOverride
// (used in Places SP) as an exception because the selection in them
// is not reset during items filtering. See STORM-133.
- if ( (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mAutoSelectOverride)
+ if ( (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mAutoSelectOverride)
&& mSelectedItems.size() )
{
mNeedsScroll = TRUE;
@@ -1994,7 +1994,7 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr
LLRect visible_doc_rect = mScrollContainer->getVisibleContentRect();
S32 icon_height = mIcon.isNull() ? 0 : mIcon->getHeight();
- S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight());
+ S32 label_height = getLabelFontForStyle(mLabelStyle)->getLineHeight();
// when navigating with keyboard, only move top of opened folder on screen, otherwise show whole folder
S32 max_height_to_show = item->isOpen() && mScrollContainer->hasFocus() ? (llmax( icon_height, label_height ) + ICON_PAD) : local_rect.getHeight();
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 8d6114c887..afad27b4e0 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -410,8 +410,8 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo
}
-// Finds width and height of this object and it's children. Also
-// makes sure that this view and it's children are the right size.
+// Finds width and height of this object and its children. Also
+// makes sure that this view and its children are the right size.
S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)
{
const Params& p = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>();
@@ -423,7 +423,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)
: 0;
if (mLabelWidthDirty)
{
- mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mSearchableLabel);
+ mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + TEXT_PAD_RIGHT;
mLabelWidthDirty = false;
}
@@ -1045,7 +1045,7 @@ void LLFolderViewItem::draw()
}
if ((mIsLoading
&& mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime"))
- || (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()
+ || (LLInventoryModelBackgroundFetch::instance().folderFetchActive()
&& root_is_loading
&& mShowLoadStatus))
{
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 2fc79f5765..4e8dc2da16 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -114,6 +114,7 @@ public:
static const S32 ICON_PAD = 2;
static const S32 ICON_WIDTH = 16;
static const S32 TEXT_PAD = 1;
+ static const S32 TEXT_PAD_RIGHT = 4;
static const S32 ARROW_SIZE = 12;
static const S32 MAX_FOLDER_ITEM_OVERLAP = 2;
// animation parameters
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index bbf66ca750..129cddda45 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -123,6 +123,22 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
+// virtual
+BOOL LLGroupList::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = LLView::handleDoubleClick(x, y, mask);
+ // Handle double click only for the selected item in the list, skip clicks on empty space.
+ if (handled)
+ {
+ if (mDoubleClickSignal)
+ {
+ (*mDoubleClickSignal)(this, x, y, mask);
+ }
+ }
+
+ return handled;
+}
+
void LLGroupList::setNameFilter(const std::string& filter)
{
std::string filter_upper = filter;
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h
index d7051db891..8abf14b3d0 100644
--- a/indra/newview/llgrouplist.h
+++ b/indra/newview/llgrouplist.h
@@ -51,6 +51,7 @@ public:
virtual void draw(); // from LLView
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); // from LLView
+ /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); // from LLView
void setNameFilter(const std::string& filter);
void toggleIcons();
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 122711a86d..dff310ecf9 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -138,7 +138,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f));
F32 right_x;
- font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x);
+ font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x);
LLUI::popMatrix();
gGL.popMatrix();
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 24a876c59a..579b6008ae 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -227,7 +227,7 @@ void LLHUDText::renderText()
segment_iter != mTextSegments.end(); ++segment_iter )
{
const LLFontGL* fontp = segment_iter->mFont;
- y_offset -= fontp->getLineHeight();
+ y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics
U8 style = segment_iter->mStyle;
LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW;
@@ -480,8 +480,6 @@ void LLHUDText::updateSize()
F32 width = 0.f;
S32 max_lines = getMaxLines();
- //S32 lines = (max_lines < 0) ? (S32)mTextSegments.size() : llmin((S32)mTextSegments.size(), max_lines);
- //F32 height = (F32)mFontp->getLineHeight() * (lines + mLabelSegments.size());
S32 start_segment;
if (max_lines < 0) start_segment = 0;
@@ -491,7 +489,7 @@ void LLHUDText::updateSize()
while (iter != mTextSegments.end())
{
const LLFontGL* fontp = iter->mFont;
- height += fontp->getLineHeight();
+ height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics
width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH));
++iter;
}
diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp
index cd71da7393..07d73c8c66 100644
--- a/indra/newview/llimhandler.cpp
+++ b/indra/newview/llimhandler.cpp
@@ -42,7 +42,7 @@ LLIMHandler::LLIMHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
+ mChannel = LLChannelManager::getInstance()->createNotificationChannel()->getHandle();
}
//--------------------------------------------------------------------------
@@ -55,13 +55,13 @@ void LLIMHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLIMHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -72,7 +72,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -104,7 +104,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
p.panel = im_box;
p.can_be_stored = false;
p.on_delete_toast = boost::bind(&LLIMHandler::onDeleteToast, this, _1);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@@ -113,7 +113,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
}
else if (notify["sigtype"].asString() == "delete")
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index a856bd0bdc..a7c4618fa4 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -171,8 +171,8 @@ void LLIMModel::setActiveSessionID(const LLUUID& session_id)
LLIMModel::LLIMModel()
{
- addNewMsgCallback(LLIMFloater::newIMCallback);
- addNewMsgCallback(toast_callback);
+ addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1));
+ addNewMsgCallback(boost::bind(&toast_callback, _1));
}
LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice)
@@ -2458,7 +2458,10 @@ void LLIMMgr::addMessage(
make_ui_sound("UISndNewIncomingIMSession");
}
- if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat))
+ bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") &&
+ LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL);
+
+ if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message)
{
LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg);
}
@@ -2977,6 +2980,17 @@ bool LLIMMgr::isVoiceCall(const LLUUID& session_id)
return im_session->mStartedAsIMCall;
}
+void LLIMMgr::addNotifiedNonFriendSessionID(const LLUUID& session_id)
+{
+ mNotifiedNonFriendSessions.insert(session_id);
+}
+
+bool LLIMMgr::isNonFriendSessionNotified(const LLUUID& session_id)
+{
+ return mNotifiedNonFriendSessions.end() != mNotifiedNonFriendSessions.find(session_id);
+
+}
+
void LLIMMgr::noteOfflineUsers(
const LLUUID& session_id,
const LLDynamicArray<LLUUID>& ids)
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index b1be26a169..7c2cd03d97 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -153,7 +153,6 @@ public:
std::map<LLUUID, LLIMSession*> mId2SessionMap;
typedef boost::signals2::signal<void(const LLSD&)> session_signal_t;
- typedef boost::function<void(const LLSD&)> session_callback_t;
session_signal_t mNewMsgSignal;
session_signal_t mNoUnreadMsgsSignal;
@@ -174,8 +173,8 @@ public:
*/
void processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id);
- boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); }
- boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); }
+ boost::signals2::connection addNewMsgCallback(const session_signal_t::slot_type& cb ) { return mNewMsgSignal.connect(cb); }
+ boost::signals2::connection addNoUnreadMsgsCallback(const session_signal_t::slot_type& cb ) { return mNoUnreadMsgsSignal.connect(cb); }
/**
* Create new session object in a model
@@ -438,6 +437,10 @@ public:
bool isVoiceCall(const LLUUID& session_id);
+ void addNotifiedNonFriendSessionID(const LLUUID& session_id);
+
+ bool isNonFriendSessionNotified(const LLUUID& session_id);
+
private:
/**
@@ -465,6 +468,14 @@ private:
typedef std::list <LLIMSessionObserver *> session_observers_list_t;
session_observers_list_t mSessionObservers;
+ // EXP-901
+ // If "Only friends and groups can IM me" option is ON but the user got message from non-friend,
+ // the user should be notified that to be able to see this message the option should be OFF.
+ // This set stores session IDs in which user was notified. Need to store this IDs so that the user
+ // be notified only one time per session with non-friend.
+ typedef std::set<LLUUID> notified_non_friend_sessions_t;
+ notified_non_friend_sessions_t mNotifiedNonFriendSessions;
+
LLSD mPendingInvitations;
LLSD mPendingAgentListUpdates;
};
diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp
index d7b82667d1..f4fe5dec01 100644
--- a/indra/newview/llinspecttoast.cpp
+++ b/indra/newview/llinspecttoast.cpp
@@ -72,6 +72,8 @@ LLInspectToast::LLInspectToast(const LLSD& notification_id) :
LLInspectToast::~LLInspectToast()
{
LLTransientFloaterMgr::getInstance()->removeControlView(this);
+
+ mConnection.disconnect();
}
// virtual
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index c0065a94e6..2de2b17373 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -113,6 +113,13 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
void teleport_via_landmark(const LLUUID& asset_id);
static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
+static bool check_category(LLInventoryModel* model,
+ const LLUUID& cat_id,
+ LLFolderView* active_folder_view,
+ LLInventoryFilter* filter);
+static bool check_item(const LLUUID& item_id,
+ LLFolderView* active_folder_view,
+ LLInventoryFilter* filter);
// Helper functions
@@ -148,7 +155,7 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory,
mInvType(LLInventoryType::IT_NONE),
mIsLink(FALSE)
{
- mInventoryPanel = inventory->getHandle();
+ mInventoryPanel = inventory->getInventoryPanelHandle();
const LLInventoryObject* obj = getInventoryObject();
mIsLink = obj && obj->getIsLinkType();
}
@@ -798,7 +805,7 @@ LLInventoryObject* LLInvFVBridge::getInventoryObject() const
LLInventoryModel* LLInvFVBridge::getInventoryModel() const
{
- LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLInventoryPanel* panel = mInventoryPanel.get();
return panel ? panel->getModel() : NULL;
}
@@ -1324,8 +1331,8 @@ void LLItemBridge::selectItem()
LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem());
if(item && !item->isFinished())
{
- item->fetchFromServer();
- //LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false);
+ //item->fetchFromServer();
+ LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false);
}
}
@@ -1738,7 +1745,7 @@ BOOL LLFolderBridge::isItemRemovable() const
return FALSE;
}
- LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLInventoryPanel* panel = mInventoryPanel.get();
LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL);
if (folderp)
{
@@ -1959,6 +1966,12 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (!isAgentAvatarValid()) return FALSE;
if (!isAgentInventory()) return FALSE; // cannot drag categories into library
+ LLInventoryPanel* destination_panel = mInventoryPanel.get();
+ if (!destination_panel) return false;
+
+ LLInventoryFilter* filter = destination_panel->getFilter();
+ if (!filter) return false;
+
const LLUUID &cat_id = inv_cat->getUUID();
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
@@ -2096,7 +2109,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// NOTE: The cargo id's count is a total of categories AND items but we err on the side of
// prevention rather than letting too many folders into the hierarchy of the outbox,
// when we're dragging the item to a new parent
- dragged_folder_count += LLToolDragAndDrop::instance().getCargoIDsCount();
+ dragged_folder_count += LLToolDragAndDrop::instance().getCargoCount();
}
}
@@ -2146,6 +2159,39 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
}
+ if (is_movable)
+ {
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ is_movable = active_panel != NULL;
+
+ // For a folder to pass the filter all its descendants are required to pass.
+ // We make this exception to allow reordering folders within an inventory panel,
+ // which has a filter applied, like Recent tab for example.
+ // There may be folders which are displayed because some of their descendants pass
+ // the filter, but other don't, and thus remain hidden. Without this check,
+ // such folders would not be allowed to be moved within a panel.
+ if (destination_panel == active_panel)
+ {
+ is_movable = true;
+ }
+ else
+ {
+ LLFolderView* active_folder_view = NULL;
+
+ if (is_movable)
+ {
+ active_folder_view = active_panel->getRootFolder();
+ is_movable = active_folder_view != NULL;
+ }
+
+ if (is_movable)
+ {
+ // Check whether the folder being dragged from active inventory panel
+ // passes the filter of the destination panel.
+ is_movable = check_category(model, cat_id, active_folder_view, filter);
+ }
+ }
+ }
//
//--------------------------------------------------------------------------------
@@ -2240,7 +2286,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
else
{
- accept = move_inv_category_world_to_agent(cat_id, mUUID, drop);
+ accept = move_inv_category_world_to_agent(cat_id, mUUID, drop, NULL, NULL, filter);
}
}
else if (LLToolDragAndDrop::SOURCE_LIBRARY == source)
@@ -2285,7 +2331,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
BOOL drop,
void (*callback)(S32, void*),
- void* user_data)
+ void* user_data,
+ LLInventoryFilter* filter)
{
// Make sure the object exists. If we allowed dragging from
// anonymous objects, it would be possible to bypass
@@ -2309,7 +2356,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
return FALSE;
}
- BOOL accept = TRUE;
+ BOOL accept = FALSE;
BOOL is_move = FALSE;
// coming from a task. Need to figure out if the person can
@@ -2318,9 +2365,16 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
LLInventoryObject::object_list_t::iterator end = inventory_objects.end();
for ( ; it != end; ++it)
{
+ LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(it->get());
+ if (!item)
+ {
+ llwarns << "Invalid inventory item for drop" << llendl;
+ continue;
+ }
+
// coming from a task. Need to figure out if the person can
// move/copy this item.
- LLPermissions perm(((LLInventoryItem*)((LLInventoryObject*)(*it)))->getPermissions());
+ LLPermissions perm(item->getPermissions());
if((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
&& perm.allowTransferTo(gAgent.getID())))
// || gAgent.isGodlike())
@@ -2335,9 +2389,14 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
is_move = TRUE;
accept = TRUE;
}
- else
+
+ if (filter && accept)
+ {
+ accept = filter->check(item);
+ }
+
+ if (!accept)
{
- accept = FALSE;
break;
}
}
@@ -2820,18 +2879,62 @@ void LLFolderBridge::pasteFromClipboard()
if(model && isClipboardPasteable())
{
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+ const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
+
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
-
- const LLUUID parent_id(mUUID);
+ const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
LLDynamicArray<LLUUID> objects;
LLInventoryClipboard::instance().retrieve(objects);
+
+ if (move_is_into_outbox)
+ {
+ LLFolderViewItem * outbox_itemp = mRoot->getItemByID(mUUID);
+
+ if (outbox_itemp)
+ {
+ LLToolDragAndDrop::instance().setCargoCount(objects.size());
+
+ BOOL can_list = TRUE;
+
+ for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
+ (iter != objects.end()) && (can_list == TRUE);
+ ++iter)
+ {
+ const LLUUID& item_id = (*iter);
+ LLInventoryItem *item = model->getItem(item_id);
+
+ if (item)
+ {
+ MASK mask = 0x0;
+ BOOL drop = FALSE;
+ EDragAndDropType cargo_type = LLViewerAssetType::lookupDragAndDropType(item->getActualType());
+ void * cargo_data = (void *) item;
+ std::string tooltip_msg;
+
+ can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg);
+ }
+ }
+
+ LLToolDragAndDrop::instance().resetCargoCount();
+
+ if (can_list == FALSE)
+ {
+ // Notify user of failure somehow -- play error sound? modal dialog?
+ return;
+ }
+ }
+ }
+
+ const LLUUID parent_id(mUUID);
+
for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
iter != objects.end();
++iter)
{
const LLUUID& item_id = (*iter);
+
LLInventoryItem *item = model->getItem(item_id);
if (item)
{
@@ -2874,8 +2977,17 @@ void LLFolderBridge::pasteLinkFromClipboard()
if(model)
{
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+ const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
+
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
+
+ if (move_is_into_outbox)
+ {
+ // Notify user of failure somehow -- play error sound? modal dialog?
+ return;
+ }
const LLUUID parent_id(mUUID);
@@ -3290,7 +3402,7 @@ void LLFolderBridge::createNewCategory(void* user_data)
{
LLFolderBridge* bridge = (LLFolderBridge*)user_data;
if(!bridge) return;
- LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(bridge->mInventoryPanel.get());
+ LLInventoryPanel* panel = bridge->mInventoryPanel.get();
if (!panel) return;
LLInventoryModel* model = panel->getModel();
if(!model) return;
@@ -3470,7 +3582,7 @@ void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item)
// use callback to rearrange favorite landmarks after adding
// to have new one placed before target (on which it was dropped). See EXT-4312.
LLPointer<AddFavoriteLandmarkCallback> cb = new AddFavoriteLandmarkCallback();
- LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLInventoryPanel* panel = mInventoryPanel.get();
LLFolderViewItem* drag_over_item = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
if (drag_over_item && drag_over_item->getListener())
{
@@ -3520,6 +3632,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (!isAgentInventory()) return FALSE; // cannot drag into library
if (!isAgentAvatarValid()) return FALSE;
+ LLInventoryPanel* destination_panel = mInventoryPanel.get();
+ if (!destination_panel) return false;
+
+ LLInventoryFilter* filter = destination_panel->getFilter();
+ if (!filter) return false;
+
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false);
const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
@@ -3529,7 +3647,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const BOOL move_is_into_favorites = (mUUID == favorites_id);
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
- const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); //(mUUID == outbox_id);
+ const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_item->getUUID(), outbox_id);
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
@@ -3608,7 +3726,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID);
- int existing_item_count = LLToolDragAndDrop::instance().getCargoIDsCount();
+ int existing_item_count = LLToolDragAndDrop::instance().getCargoCount();
if (master_folder != NULL)
{
@@ -3628,6 +3746,21 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
}
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+
+ // Check whether the item being dragged from active inventory panel
+ // passes the filter of the destination panel.
+ if (accept && active_panel)
+ {
+ LLFolderView* active_folder_view = active_panel->getRootFolder();
+ if (!active_folder_view) return false;
+
+ LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID());
+ if (!fv_item) return false;
+
+ accept = filter->check(fv_item);
+ }
+
if (accept && drop)
{
if (inv_item->getType() == LLAssetType::AT_GESTURE
@@ -3637,15 +3770,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
// If an item is being dragged between windows, unselect everything in the active window
// so that we don't follow the selection to its new location (which is very annoying).
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
- if (active_panel)
- {
- LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
- if (active_panel && (panel != active_panel))
+ if (active_panel && (destination_panel != active_panel))
{
active_panel->unSelectAll();
}
- }
//--------------------------------------------------------------------------------
// Destination folder logic
@@ -3655,8 +3783,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// (only reorder the item in Favorites folder)
if ((mUUID == inv_item->getParentUUID()) && move_is_into_favorites)
{
- LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
- LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
+ LLFolderViewItem* itemp = destination_panel->getRootFolder()->getDraggingOverItem();
if (itemp)
{
LLUUID srcItemId = inv_item->getUUID();
@@ -3760,6 +3887,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
accept = FALSE;
}
+ // Check whether the item being dragged from in world
+ // passes the filter of the destination panel.
+ if (accept)
+ {
+ accept = filter->check(inv_item);
+ }
+
if (accept && drop)
{
LLMoveInv* move_inv = new LLMoveInv;
@@ -3797,6 +3931,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
accept = !(move_is_into_current_outfit || move_is_into_outfit);
}
+ // Check whether the item being dragged from notecard
+ // passes the filter of the destination panel.
+ if (accept)
+ {
+ accept = filter->check(inv_item);
+ }
+
if (accept && drop)
{
copy_inventory_from_notecard(mUUID, // Drop to the chosen destination folder
@@ -3828,6 +3969,21 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
accept = can_move_to_landmarks(inv_item);
}
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+
+ // Check whether the item being dragged from the library
+ // passes the filter of the destination panel.
+ if (accept && active_panel)
+ {
+ LLFolderView* active_folder_view = active_panel->getRootFolder();
+ if (!active_folder_view) return false;
+
+ LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID());
+ if (!fv_item) return false;
+
+ accept = filter->check(fv_item);
+ }
+
if (accept && drop)
{
// FAVORITES folder
@@ -3862,6 +4018,69 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
return accept;
}
+// static
+bool check_category(LLInventoryModel* model,
+ const LLUUID& cat_id,
+ LLFolderView* active_folder_view,
+ LLInventoryFilter* filter)
+{
+ if (!model || !active_folder_view || !filter)
+ return false;
+
+ if (!filter->checkFolder(cat_id))
+ {
+ return false;
+ }
+
+ LLInventoryModel::cat_array_t descendent_categories;
+ LLInventoryModel::item_array_t descendent_items;
+ model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE);
+
+ S32 num_descendent_categories = descendent_categories.count();
+ S32 num_descendent_items = descendent_items.count();
+
+ if (num_descendent_categories + num_descendent_items == 0)
+ {
+ // Empty folder should be checked as any other folder view item.
+ // If we are filtering by date the folder should not pass because
+ // it doesn't have its own creation date. See LLInvFVBridge::getCreationDate().
+ return check_item(cat_id, active_folder_view, filter);
+ }
+
+ for (S32 i = 0; i < num_descendent_categories; ++i)
+ {
+ LLInventoryCategory* category = descendent_categories[i];
+ if(!check_category(model, category->getUUID(), active_folder_view, filter))
+ {
+ return false;
+ }
+ }
+
+ for (S32 i = 0; i < num_descendent_items; ++i)
+ {
+ LLViewerInventoryItem* item = descendent_items[i];
+ if(!check_item(item->getUUID(), active_folder_view, filter))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+// static
+bool check_item(const LLUUID& item_id,
+ LLFolderView* active_folder_view,
+ LLInventoryFilter* filter)
+{
+ if (!active_folder_view || !filter) return false;
+
+ LLFolderViewItem* fv_item = active_folder_view->getItemByID(item_id);
+ if (!fv_item) return false;
+
+ return filter->check(fv_item);
+}
+
// +=================================================+
// | LLTextureBridge |
// +=================================================+
@@ -4184,7 +4403,7 @@ LLCallingCardBridge::~LLCallingCardBridge()
void LLCallingCardBridge::refreshFolderViewItem()
{
- LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLInventoryPanel* panel = mInventoryPanel.get();
LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL;
if (itemp)
{
@@ -4633,14 +4852,14 @@ void LLAnimationBridge::performAction(LLInventoryModel* model, std::string actio
{
if (getItem())
{
- LLPreviewAnim::e_activation_type activate = LLPreviewAnim::NONE;
- if ("playworld" == action) activate = LLPreviewAnim::PLAY;
- if ("playlocal" == action) activate = LLPreviewAnim::AUDITION;
+ LLSD::String activate = "NONE";
+ if ("playworld" == action) activate = "Inworld";
+ if ("playlocal" == action) activate = "Locally";
LLPreviewAnim* preview = LLFloaterReg::showTypedInstance<LLPreviewAnim>("preview_anim", LLSD(mUUID));
if (preview)
{
- preview->activate(activate);
+ preview->play(activate);
}
}
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 871657a58a..3b4f845f54 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -35,6 +35,7 @@
#include "llviewercontrol.h"
#include "llwearable.h"
+class LLInventoryFilter;
class LLInventoryPanel;
class LLInventoryModel;
class LLMenuGL;
@@ -161,7 +162,7 @@ protected:
BOOL restamp);
void removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch);
protected:
- LLHandle<LLPanel> mInventoryPanel;
+ LLHandle<LLInventoryPanel> mInventoryPanel;
LLFolderView* mRoot;
const LLUUID mUUID; // item id
LLInventoryType::EType mInvType;
@@ -645,7 +646,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
BOOL drop,
void (*callback)(S32, void*) = NULL,
- void* user_data = NULL);
+ void* user_data = NULL,
+ LLInventoryFilter* filter = NULL);
// Utility function to hide all entries except those in the list
// Can be called multiple times on the same menu (e.g. if multiple items
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index d54bce4619..5496c273f2 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -108,16 +108,48 @@ BOOL LLInventoryFilter::check(const LLFolderViewItem* item)
return passed;
}
-bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder)
+bool LLInventoryFilter::check(const LLInventoryItem* item)
{
- // we're showing all folders, overriding filter
- if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
+ mSubStringMatchOffset = mFilterSubString.size() ? item->getName().find(mFilterSubString) : std::string::npos;
+
+ const bool passed_filtertype = checkAgainstFilterType(item);
+ const bool passed_permissions = checkAgainstPermissions(item);
+ const bool passed = (passed_filtertype &&
+ passed_permissions &&
+ (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos));
+
+ return passed;
+}
+
+bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) const
+{
+ if (!folder)
{
- return true;
+ llwarns << "The filter can not be checked on an invalid folder." << llendl;
+ llassert(false); // crash in development builds
+ return false;
}
const LLFolderViewEventListener* listener = folder->getListener();
+ if (!listener)
+ {
+ llwarns << "Folder view event listener not found." << llendl;
+ llassert(false); // crash in development builds
+ return false;
+ }
+
const LLUUID folder_id = listener->getUUID();
+
+ return checkFolder(folder_id);
+}
+
+bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
+{
+ // we're showing all folders, overriding filter
+ if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
+ {
+ return true;
+ }
if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY)
{
@@ -227,6 +259,56 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con
return TRUE;
}
+bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) const
+{
+ LLInventoryType::EType object_type = item->getInventoryType();
+ const LLUUID object_id = item->getUUID();
+
+ const U32 filterTypes = mFilterOps.mFilterTypes;
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // FILTERTYPE_OBJECT
+ // Pass if this item's type is of the correct filter type
+ if (filterTypes & FILTERTYPE_OBJECT)
+ {
+ // If it has no type, pass it, unless it's a link.
+ if (object_type == LLInventoryType::IT_NONE)
+ {
+ if (item && item->getIsLinkType())
+ {
+ return false;
+ }
+ }
+ else if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0))
+ {
+ return false;
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // FILTERTYPE_UUID
+ // Pass if this item is the target UUID or if it links to the target UUID
+ if (filterTypes & FILTERTYPE_UUID)
+ {
+ if (!item) return false;
+
+ if (item->getLinkedUUID() != mFilterOps.mFilterUUID)
+ return false;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // FILTERTYPE_DATE
+ // Pass if this item is within the date range.
+ if (filterTypes & FILTERTYPE_DATE)
+ {
+ // We don't get the updated item creation date for the task inventory or
+ // a notecard embedded item. See LLTaskInvFVBridge::getCreationDate().
+ return false;
+ }
+
+ return true;
+}
+
BOOL LLInventoryFilter::checkAgainstPermissions(const LLFolderViewItem* item) const
{
const LLFolderViewEventListener* listener = item->getListener();
@@ -244,6 +326,17 @@ BOOL LLInventoryFilter::checkAgainstPermissions(const LLFolderViewItem* item) co
return (perm & mFilterOps.mPermissions) == mFilterOps.mPermissions;
}
+bool LLInventoryFilter::checkAgainstPermissions(const LLInventoryItem* item) const
+{
+ if (!item) return false;
+
+ LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
+ PermissionMask perm = new_item->getPermissionMask();
+ new_item = NULL;
+
+ return (perm & mFilterOps.mPermissions) == mFilterOps.mPermissions;
+}
+
BOOL LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewItem* item) const
{
const LLFolderViewEventListener* listener = item->getListener();
@@ -464,7 +557,9 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date)
mFilterOps.mMaxDate = llmax(mFilterOps.mMinDate, max_date);
setModified();
}
- mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+
+ areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
+ : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
}
void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
@@ -476,10 +571,12 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
}
if (!sl && isSinceLogoff())
{
- setDateRange(0, time_max());
+ setDateRange(time_min(), time_max());
setModified();
}
- mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+
+ areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
+ : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
}
BOOL LLInventoryFilter::isSinceLogoff() const
@@ -524,7 +621,9 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
setModified(FILTER_RESTART);
}
}
- mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+
+ areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
+ : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
}
void LLInventoryFilter::setFilterLinks(U64 filter_links)
@@ -804,7 +903,7 @@ const std::string& LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()
+ if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive()
&& filtered_by_type
&& !filtered_by_all_types)
{
@@ -974,3 +1073,10 @@ const std::string& LLInventoryFilter::getEmptyLookupMessage() const
return mEmptyLookupMessage;
}
+
+bool LLInventoryFilter::areDateLimitsSet()
+{
+ return mFilterOps.mMinDate != time_min()
+ || mFilterOps.mMaxDate != time_max()
+ || mFilterOps.mHoursAgo != 0;
+}
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index bba24ac652..6be2acfaa3 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -32,6 +32,7 @@
class LLFolderViewItem;
class LLFolderViewFolder;
+class LLInventoryItem;
class LLInventoryFilter
{
@@ -115,9 +116,13 @@ public:
// + Execution And Results
// +-------------------------------------------------------------------+
BOOL check(const LLFolderViewItem* item);
- bool checkFolder(const LLFolderViewFolder* folder);
+ bool check(const LLInventoryItem* item);
+ bool checkFolder(const LLFolderViewFolder* folder) const;
+ bool checkFolder(const LLUUID& folder_id) const;
BOOL checkAgainstFilterType(const LLFolderViewItem* item) const;
+ bool checkAgainstFilterType(const LLInventoryItem* item) const;
BOOL checkAgainstPermissions(const LLFolderViewItem* item) const;
+ bool checkAgainstPermissions(const LLInventoryItem* item) const;
BOOL checkAgainstFilterLinks(const LLFolderViewItem* item) const;
std::string::size_type getStringMatchOffset() const;
@@ -175,6 +180,8 @@ public:
void fromLLSD(LLSD& data);
private:
+ bool areDateLimitsSet();
+
struct FilterOps
{
FilterOps();
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 91fdd67806..f4d0110b0f 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -43,6 +43,7 @@ const S32 MAX_FETCH_RETRIES = 10;
LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() :
mBackgroundFetchActive(FALSE),
+ mFolderFetchActive(false),
mAllFoldersFetched(FALSE),
mRecursiveInventoryFetchStarted(FALSE),
mRecursiveLibraryFetchStarted(FALSE),
@@ -50,7 +51,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() :
mMinTimeBetweenFetches(0.3f),
mMaxTimeBetweenFetches(10.f),
mTimelyFetchPending(FALSE),
- mBulkFetchCount(0)
+ mFetchCount(0)
{
}
@@ -60,7 +61,7 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch()
bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const
{
- return mFetchQueue.empty() && mBulkFetchCount<=0;
+ return mFetchQueue.empty() && mFetchCount<=0;
}
bool LLInventoryModelBackgroundFetch::libraryFetchStarted() const
@@ -98,19 +99,21 @@ bool LLInventoryModelBackgroundFetch::isEverythingFetched() const
return mAllFoldersFetched;
}
-BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const
+BOOL LLInventoryModelBackgroundFetch::folderFetchActive() const
{
- return mBackgroundFetchActive;
+ return mFolderFetchActive;
}
-void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive)
+void LLInventoryModelBackgroundFetch::start(const LLUUID& id, BOOL recursive)
{
- if (!mAllFoldersFetched || cat_id.notNull())
- {
- LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL;
+ LLViewerInventoryCategory* cat = gInventory.getCategory(id);
+ if (cat || (id.isNull() && !isEverythingFetched()))
+ { // it's a folder, do a bulk fetch
+ LL_DEBUGS("InventoryFetch") << "Start fetching category: " << id << ", recursive: " << recursive << LL_ENDL;
mBackgroundFetchActive = TRUE;
- if (cat_id.isNull())
+ mFolderFetchActive = true;
+ if (id.isNull())
{
if (!mRecursiveInventoryFetchStarted)
{
@@ -128,41 +131,41 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive
else
{
// Specific folder requests go to front of queue.
- if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id)
+ if (mFetchQueue.empty() || mFetchQueue.front().mUUID != id)
{
- mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive));
+ mFetchQueue.push_front(FetchQueueInfo(id, recursive));
gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
}
- if (cat_id == gInventory.getLibraryRootFolderID())
+ if (id == gInventory.getLibraryRootFolderID())
{
mRecursiveLibraryFetchStarted |= recursive;
}
- if (cat_id == gInventory.getRootFolderID())
+ if (id == gInventory.getRootFolderID())
{
mRecursiveInventoryFetchStarted |= recursive;
}
}
}
+ else if (LLViewerInventoryItem* itemp = gInventory.getItem(id))
+ {
+ if (!itemp->mIsComplete && (mFetchQueue.empty() || mFetchQueue.front().mUUID != id))
+ {
+ mBackgroundFetchActive = TRUE;
+
+ mFetchQueue.push_front(FetchQueueInfo(id, false, false));
+ gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+ }
+ }
}
void LLInventoryModelBackgroundFetch::findLostItems()
{
mBackgroundFetchActive = TRUE;
+ mFolderFetchActive = true;
mFetchQueue.push_back(FetchQueueInfo(LLUUID::null, TRUE));
gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
}
-void LLInventoryModelBackgroundFetch::stopBackgroundFetch()
-{
- if (mBackgroundFetchActive)
- {
- mBackgroundFetchActive = FALSE;
- gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
- mBulkFetchCount=0;
- mMinTimeBetweenFetches=0.0f;
- }
-}
-
void LLInventoryModelBackgroundFetch::setAllFoldersFetched()
{
if (mRecursiveInventoryFetchStarted &&
@@ -170,7 +173,7 @@ void LLInventoryModelBackgroundFetch::setAllFoldersFetched()
{
mAllFoldersFetched = TRUE;
}
- stopBackgroundFetch();
+ mFolderFetchActive = false;
}
void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *)
@@ -183,10 +186,9 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
if (mBackgroundFetchActive && gAgent.getRegion())
{
// If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
- std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents2");
- if (gSavedSettings.getBOOL("UseHTTPInventory") && !url.empty())
+ if (gSavedSettings.getBOOL("UseHTTPInventory"))
{
- bulkFetch(url);
+ bulkFetch();
return;
}
@@ -201,6 +203,9 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
llinfos << "Inventory fetch completed" << llendl;
setAllFoldersFetched();
+ mBackgroundFetchActive = false;
+ mFolderFetchActive = false;
+
return;
}
@@ -230,80 +235,114 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
}
const FetchQueueInfo info = mFetchQueue.front();
- LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID);
- // Category has been deleted, remove from queue.
- if (!cat)
+ if (info.mIsCategory)
{
- mFetchQueue.pop_front();
- continue;
- }
+
+ LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID);
+
+ // Category has been deleted, remove from queue.
+ if (!cat)
+ {
+ mFetchQueue.pop_front();
+ continue;
+ }
- if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches &&
- LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
- {
- // Category exists but has no children yet, fetch the descendants
- // for now, just request every time and rely on retry timer to throttle.
- if (cat->fetch())
+ if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches &&
+ LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
{
- mFetchTimer.reset();
- mTimelyFetchPending = TRUE;
+ // Category exists but has no children yet, fetch the descendants
+ // for now, just request every time and rely on retry timer to throttle.
+ if (cat->fetch())
+ {
+ mFetchTimer.reset();
+ mTimelyFetchPending = TRUE;
+ }
+ else
+ {
+ // The catagory also tracks if it has expired and here it says it hasn't
+ // yet. Get out of here because nothing is going to happen until we
+ // update the timers.
+ break;
+ }
}
- else
+ // Do I have all my children?
+ else if (gInventory.isCategoryComplete(info.mUUID))
{
- // The catagory also tracks if it has expired and here it says it hasn't
- // yet. Get out of here because nothing is going to happen until we
- // update the timers.
+ // Finished with this category, remove from queue.
+ mFetchQueue.pop_front();
+
+ // Add all children to queue.
+ LLInventoryModel::cat_array_t* categories;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items);
+ for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
+ it != categories->end();
+ ++it)
+ {
+ mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive));
+ }
+
+ // We received a response in less than the fast time.
+ if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time)
+ {
+ // Shrink timeouts based on success.
+ mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f);
+ mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f);
+ lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ }
+
+ mTimelyFetchPending = FALSE;
+ continue;
+ }
+ else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches)
+ {
+ // Received first packet, but our num descendants does not match db's num descendants
+ // so try again later.
+ mFetchQueue.pop_front();
+
+ if (mNumFetchRetries++ < MAX_FETCH_RETRIES)
+ {
+ // push on back of queue
+ mFetchQueue.push_back(info);
+ }
+ mTimelyFetchPending = FALSE;
+ mFetchTimer.reset();
break;
}
+
+ // Not enough time has elapsed to do a new fetch
+ break;
}
- // Do I have all my children?
- else if (gInventory.isCategoryComplete(info.mCatUUID))
+ else
{
- // Finished with this category, remove from queue.
- mFetchQueue.pop_front();
+ LLViewerInventoryItem* itemp = gInventory.getItem(info.mUUID);
- // Add all children to queue.
- LLInventoryModel::cat_array_t* categories;
- LLInventoryModel::item_array_t* items;
- gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items);
- for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
- it != categories->end();
- ++it)
+ mFetchQueue.pop_front();
+ if (!itemp)
{
- mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive));
+ continue;
}
- // We received a response in less than the fast time.
- if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time)
+ if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches)
{
- // Shrink timeouts based on success.
- mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f);
- mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f);
- lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ itemp->fetchFromServer();
+ mFetchTimer.reset();
+ mTimelyFetchPending = TRUE;
}
-
- mTimelyFetchPending = FALSE;
- continue;
- }
- else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches)
- {
- // Received first packet, but our num descendants does not match db's num descendants
- // so try again later.
- mFetchQueue.pop_front();
-
- if (mNumFetchRetries++ < MAX_FETCH_RETRIES)
+ else if (itemp->mIsComplete)
+ {
+ mTimelyFetchPending = FALSE;
+ }
+ else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches)
{
- // push on back of queue
mFetchQueue.push_back(info);
+ mFetchTimer.reset();
+ mTimelyFetchPending = FALSE;
}
- mTimelyFetchPending = FALSE;
- mFetchTimer.reset();
+ // Not enough time has elapsed to do a new fetch
break;
}
-
- // Not enough time has elapsed to do a new fetch
- break;
}
//
@@ -313,15 +352,35 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
}
}
-void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching)
+void LLInventoryModelBackgroundFetch::incrFetchCount(S16 fetching)
{
- mBulkFetchCount += fetching;
- if (mBulkFetchCount < 0)
+ mFetchCount += fetching;
+ if (mFetchCount < 0)
{
- mBulkFetchCount = 0;
+ mFetchCount = 0;
}
}
+class LLInventoryModelFetchItemResponder : public LLInventoryModel::fetchInventoryResponder
+{
+public:
+ LLInventoryModelFetchItemResponder(const LLSD& request_sd) : LLInventoryModel::fetchInventoryResponder(request_sd) {};
+ void result(const LLSD& content);
+ void error(U32 status, const std::string& reason);
+};
+
+void LLInventoryModelFetchItemResponder::result( const LLSD& content )
+{
+ LLInventoryModel::fetchInventoryResponder::result(content);
+ LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
+}
+
+void LLInventoryModelFetchItemResponder::error( U32 status, const std::string& reason )
+{
+ LLInventoryModel::fetchInventoryResponder::error(status, reason);
+ LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
+}
+
class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder
{
@@ -458,7 +517,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)
}
}
- fetcher->incrBulkFetch(-1);
+ fetcher->incrFetchCount(-1);
if (fetcher->isBulkFetchProcessingComplete())
{
@@ -477,7 +536,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str
llinfos << "LLInventoryModelFetchDescendentsResponder::error "
<< status << ": " << reason << llendl;
- fetcher->incrBulkFetch(-1);
+ fetcher->incrFetchCount(-1);
if (status==499) // timed out
{
@@ -508,12 +567,13 @@ BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat
// Bundle up a bunch of requests to send all at once.
// static
-void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)
+void LLInventoryModelBackgroundFetch::bulkFetch()
{
//Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped.
//If there are items in mFetchQueue, we want to check the time since the last bulkFetch was
//sent. If it exceeds our retry time, go ahead and fire off another batch.
- //Stopbackgroundfetch will be run from the Responder instead of here.
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region) return;
S16 max_concurrent_fetches=8;
F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely.
@@ -523,12 +583,13 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)
}
if (gDisconnected ||
- (mBulkFetchCount > max_concurrent_fetches) ||
+ (mFetchCount > max_concurrent_fetches) ||
(mFetchTimer.getElapsedTimeF32() < mMinTimeBetweenFetches))
{
return; // just bail if we are disconnected
}
+ U32 item_count=0;
U32 folder_count=0;
U32 max_batch_size=5;
@@ -536,83 +597,159 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url)
uuid_vec_t recursive_cats;
- LLSD body;
- LLSD body_lib;
+ LLSD folder_request_body;
+ LLSD folder_request_body_lib;
+ LLSD item_request_body;
+ LLSD item_request_body_lib;
- while (!(mFetchQueue.empty()) && (folder_count < max_batch_size))
+ while (!mFetchQueue.empty()
+ && (item_count + folder_count) < max_batch_size)
{
const FetchQueueInfo& fetch_info = mFetchQueue.front();
- const LLUUID &cat_id = fetch_info.mCatUUID;
- if (cat_id.isNull()) //DEV-17797
- {
- LLSD folder_sd;
- folder_sd["folder_id"] = LLUUID::null.asString();
- folder_sd["owner_id"] = gAgent.getID();
- folder_sd["sort_order"] = (LLSD::Integer)sort_order;
- folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE;
- folder_sd["fetch_items"] = (LLSD::Boolean)TRUE;
- body["folders"].append(folder_sd);
- folder_count++;
- }
- else
- {
- const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
+ if (fetch_info.mIsCategory)
+ {
+ const LLUUID &cat_id = fetch_info.mUUID;
+ if (cat_id.isNull()) //DEV-17797
+ {
+ LLSD folder_sd;
+ folder_sd["folder_id"] = LLUUID::null.asString();
+ folder_sd["owner_id"] = gAgent.getID();
+ folder_sd["sort_order"] = (LLSD::Integer)sort_order;
+ folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE;
+ folder_sd["fetch_items"] = (LLSD::Boolean)TRUE;
+ folder_request_body["folders"].append(folder_sd);
+ folder_count++;
+ }
+ else
+ {
+ const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
- if (cat)
- {
- if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
- {
- LLSD folder_sd;
- folder_sd["folder_id"] = cat->getUUID();
- folder_sd["owner_id"] = cat->getOwnerID();
- folder_sd["sort_order"] = (LLSD::Integer)sort_order;
- folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted;
- folder_sd["fetch_items"] = (LLSD::Boolean)TRUE;
-
- if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID())
- body_lib["folders"].append(folder_sd);
- else
- body["folders"].append(folder_sd);
- folder_count++;
- }
- // May already have this folder, but append child folders to list.
- if (fetch_info.mRecursive)
- {
- LLInventoryModel::cat_array_t* categories;
- LLInventoryModel::item_array_t* items;
- gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items);
- for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
- it != categories->end();
- ++it)
+ if (cat)
+ {
+ if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
{
- mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive));
- }
- }
- }
- }
- if (fetch_info.mRecursive)
- recursive_cats.push_back(cat_id);
+ LLSD folder_sd;
+ folder_sd["folder_id"] = cat->getUUID();
+ folder_sd["owner_id"] = cat->getOwnerID();
+ folder_sd["sort_order"] = (LLSD::Integer)sort_order;
+ folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted;
+ folder_sd["fetch_items"] = (LLSD::Boolean)TRUE;
+
+ if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID())
+ folder_request_body_lib["folders"].append(folder_sd);
+ else
+ folder_request_body["folders"].append(folder_sd);
+ folder_count++;
+ }
+ // May already have this folder, but append child folders to list.
+ if (fetch_info.mRecursive)
+ {
+ LLInventoryModel::cat_array_t* categories;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items);
+ for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
+ it != categories->end();
+ ++it)
+ {
+ mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive));
+ }
+ }
+ }
+ }
+ if (fetch_info.mRecursive)
+ recursive_cats.push_back(cat_id);
+ }
+ else
+ {
+ LLViewerInventoryItem* itemp = gInventory.getItem(fetch_info.mUUID);
+ if (itemp)
+ {
+ LLSD item_sd;
+ item_sd["owner_id"] = itemp->getPermissions().getOwner();
+ item_sd["item_id"] = itemp->getUUID();
+ if (itemp->getPermissions().getOwner() == gAgent.getID())
+ {
+ item_request_body.append(item_sd);
+ }
+ else
+ {
+ item_request_body_lib.append(item_sd);
+ }
+ //itemp->fetchFromServer();
+ item_count++;
+ }
+ }
mFetchQueue.pop_front();
}
- if (folder_count > 0)
+ if (item_count + folder_count > 0)
{
- mBulkFetchCount++;
- if (body["folders"].size())
+ if (folder_count)
{
- LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body, recursive_cats);
- LLHTTPClient::post(url, body, fetcher, 300.0);
+ std::string url = region->getCapability("FetchInventoryDescendents2");
+ mFetchCount++;
+ if (folder_request_body["folders"].size())
+ {
+ LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats);
+ LLHTTPClient::post(url, folder_request_body, fetcher, 300.0);
+ }
+ if (folder_request_body_lib["folders"].size())
+ {
+ std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2");
+
+ LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body_lib, recursive_cats);
+ LLHTTPClient::post(url_lib, folder_request_body_lib, fetcher, 300.0);
+ }
}
- if (body_lib["folders"].size())
+ if (item_count)
{
- std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2");
-
- LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats);
- LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0);
+ std::string url;
+
+ if (item_request_body.size())
+ {
+ mFetchCount++;
+ url = region->getCapability("FetchInventory2");
+ if (!url.empty())
+ {
+ LLSD body;
+ body["agent_id"] = gAgent.getID();
+ body["items"] = item_request_body;
+
+ LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body));
+ }
+ //else
+ //{
+ // LLMessageSystem* msg = gMessageSystem;
+ // msg->newMessage("FetchInventory");
+ // msg->nextBlock("AgentData");
+ // msg->addUUID("AgentID", gAgent.getID());
+ // msg->addUUID("SessionID", gAgent.getSessionID());
+ // msg->nextBlock("InventoryData");
+ // msg->addUUID("OwnerID", mPermissions.getOwner());
+ // msg->addUUID("ItemID", mUUID);
+ // gAgent.sendReliableMessage();
+ //}
+ }
+
+ if (item_request_body_lib.size())
+ {
+ mFetchCount++;
+
+ url = region->getCapability("FetchLib2");
+ if (!url.empty())
+ {
+ LLSD body;
+ body["agent_id"] = gAgent.getID();
+ body["items"] = item_request_body_lib;
+
+ LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body));
+ }
+ }
}
mFetchTimer.reset();
}
+
else if (isBulkFetchProcessingComplete())
{
setAllFoldersFetched();
@@ -624,7 +761,7 @@ bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LL
for (fetch_queue_t::const_iterator it = mFetchQueue.begin();
it != mFetchQueue.end(); ++it)
{
- const LLUUID& fetch_id = (*it).mCatUUID;
+ const LLUUID& fetch_id = (*it).mUUID;
if (gInventory.isObjectDescendentOf(fetch_id, cat_id))
return false;
}
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index c35c785ceb..9dfedddd6d 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -48,7 +48,7 @@ public:
// This gets triggered when performing a filter-search.
void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE);
- BOOL backgroundFetchActive() const;
+ BOOL folderFetchActive() const;
bool isEverythingFetched() const; // completing the fetch once per session should be sufficient
bool libraryFetchStarted() const;
@@ -60,14 +60,13 @@ public:
bool inventoryFetchInProgress() const;
void findLostItems();
+ void incrFetchCount(S16 fetching);
protected:
- void incrBulkFetch(S16 fetching);
bool isBulkFetchProcessingComplete() const;
- void bulkFetch(std::string url);
+ void bulkFetch();
void backgroundFetch();
static void backgroundFetchCB(void*); // background fetch idle function
- void stopBackgroundFetch(); // stop fetch process
void setAllFoldersFetched();
bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const;
@@ -77,7 +76,8 @@ private:
BOOL mAllFoldersFetched;
BOOL mBackgroundFetchActive;
- S16 mBulkFetchCount;
+ bool mFolderFetchActive;
+ S16 mFetchCount;
BOOL mTimelyFetchPending;
S32 mNumFetchRetries;
@@ -87,11 +87,11 @@ private:
struct FetchQueueInfo
{
- FetchQueueInfo(const LLUUID& id, BOOL recursive) :
- mCatUUID(id), mRecursive(recursive)
- {
- }
- LLUUID mCatUUID;
+ FetchQueueInfo(const LLUUID& id, BOOL recursive, bool is_category = true) :
+ mUUID(id), mRecursive(recursive), mIsCategory(is_category)
+ {}
+ LLUUID mUUID;
+ bool mIsCategory;
BOOL mRecursive;
};
typedef std::deque<FetchQueueInfo> fetch_queue_t;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 382569fa3a..01a8ecfb5d 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -817,7 +817,7 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
if(handled)
{
ECursorType cursor = getWindow()->getCursor();
- if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && cursor == UI_CURSOR_ARROW)
+ if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW)
{
// replace arrow cursor with arrow and hourglass cursor
getWindow()->setCursor(UI_CURSOR_WORKING);
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 8279163762..7d805f6862 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -160,6 +160,8 @@ public:
void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+ LLHandle<LLInventoryPanel> getInventoryPanelHandle() const { return getDerivedHandle<LLInventoryPanel>(); }
+
// Callbacks
void doToSelected(const LLSD& userdata);
void doCreate(const LLSD& userdata);
diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp
index 7e9c3c84a7..c0a323d6cb 100644
--- a/indra/newview/llmemoryview.cpp
+++ b/indra/newview/llmemoryview.cpp
@@ -220,7 +220,7 @@ void LLMemoryView::draw()
S32 x, y;
S32 margin = 10;
- S32 texth = (S32)LLFontGL::getFontMonospace()->getLineHeight();
+ S32 texth = LLFontGL::getFontMonospace()->getLineHeight();
S32 xleft = margin;
S32 ytop = height - margin;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index b02bf79a28..bd20210190 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -728,7 +728,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
if (!http_url.empty())
{
ret = mCurlRequest->getByteRange(http_url, headers, offset, size,
- new LLMeshSkinInfoResponder(mesh_id, offset, size));
+ new LLMeshSkinInfoResponder(mesh_id, offset, size));
if(ret)
{
LLMeshRepository::sHTTPRequestCount++;
@@ -805,7 +805,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
if (!http_url.empty())
{
ret = mCurlRequest->getByteRange(http_url, headers, offset, size,
- new LLMeshDecompositionResponder(mesh_id, offset, size));
+ new LLMeshDecompositionResponder(mesh_id, offset, size));
if(ret)
{
LLMeshRepository::sHTTPRequestCount++;
@@ -881,7 +881,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
if (!http_url.empty())
{
ret = mCurlRequest->getByteRange(http_url, headers, offset, size,
- new LLMeshPhysicsShapeResponder(mesh_id, offset, size));
+ new LLMeshPhysicsShapeResponder(mesh_id, offset, size));
if(ret)
{
@@ -1093,17 +1093,19 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat
bool LLMeshRepoThread::lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size)
{
- LLVolume* volume = new LLVolume(mesh_params, LLVolumeLODGroup::getVolumeScaleFromDetail(lod));
+ LLPointer<LLVolume> volume = new LLVolume(mesh_params, LLVolumeLODGroup::getVolumeScaleFromDetail(lod));
std::string mesh_string((char*) data, data_size);
std::istringstream stream(mesh_string);
if (volume->unpackVolumeFaces(stream, data_size))
{
- LoadedMesh mesh(volume, mesh_params, lod);
if (volume->getNumFaces() > 0)
{
- LLMutexLock lock(mMutex);
- mLoadedQ.push(mesh);
+ LoadedMesh mesh(volume, mesh_params, lod);
+ {
+ LLMutexLock lock(mMutex);
+ mLoadedQ.push(mesh);
+ }
return true;
}
}
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index 04e1570081..7a70370fe3 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -29,6 +29,7 @@
#include "llstring.h"
#include "lluuid.h"
+#include "llextendedstatus.h"
class LLViewerObject;
class LLMessageSystem;
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 78f1fd583e..c71ea48193 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -126,7 +126,7 @@ BOOL LLNearbyChatBar::postBuild()
// virtual
void LLNearbyChatBar::onOpen(const LLSD& key)
{
- enableTranslationCheckbox(LLTranslate::isTranslationConfigured());
+ showTranslationCheckbox(LLTranslate::isTranslationConfigured());
}
bool LLNearbyChatBar::applyRectControl()
@@ -172,9 +172,9 @@ void LLNearbyChatBar::showHistory()
}
}
-void LLNearbyChatBar::enableTranslationCheckbox(BOOL enable)
+void LLNearbyChatBar::showTranslationCheckbox(BOOL show)
{
- getChild<LLUICtrl>("translate_chat_checkbox")->setEnabled(enable);
+ getChild<LLUICtrl>("translate_chat_checkbox_lp")->setVisible(show);
}
void LLNearbyChatBar::draw()
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index bb07c60154..aa9c3a6a98 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -63,7 +63,7 @@ public:
static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
void showHistory();
- void enableTranslationCheckbox(BOOL enable);
+ void showTranslationCheckbox(BOOL show);
/*virtual*/void setMinimized(BOOL b);
protected:
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 240a7c7a35..600fd395fb 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -458,7 +458,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i
channel->setCreatePanelCallback(callback);
- mChannel = LLChannelManager::getInstance()->addChannel(channel);
+ LLChannelManager::getInstance()->addChannel(channel);
+
+ mChannel = channel->getHandle();
}
LLNearbyChatHandler::~LLNearbyChatHandler()
@@ -558,11 +560,12 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
&& nearby_chat->isInVisibleChain()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
- || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
+ || mChannel.isDead()
+ || !mChannel.get()->getShowToasts() ) // to prevent toasts in Busy mode
return;//no need in toast if chat is visible or if bubble chat is enabled
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -579,7 +582,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
}
*/
- LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel);
+ LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel.get());
if(channel)
{
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 15d5d7c162..1bda7640bd 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -74,6 +74,8 @@ const F32 DOT_SCALE = 0.75f;
const F32 MIN_PICK_SCALE = 2.f;
const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag
+const F64 COARSEUPDATE_MAX_Z = 1020.0f;
+
LLNetMap::LLNetMap (const Params & p)
: LLUICtrl (p),
mBackgroundColor (p.bg_color()),
@@ -300,7 +302,8 @@ void LLNetMap::draw()
}
LLVector3 map_center_agent = gAgent.getPosAgentFromGlobal(mObjectImageCenterGlobal);
- map_center_agent -= gAgentCamera.getCameraPositionAgent();
+ LLVector3 camera_position = gAgentCamera.getCameraPositionAgent();
+ map_center_agent -= camera_position;
map_center_agent.mV[VX] *= mScale/region_width;
map_center_agent.mV[VY] *= mScale/region_width;
@@ -321,9 +324,6 @@ void LLNetMap::draw()
gGL.popMatrix();
- LLVector3d pos_global;
- LLVector3 pos_map;
-
// Mouse pointer in local coordinates
S32 local_mouse_x;
S32 local_mouse_y;
@@ -333,90 +333,67 @@ void LLNetMap::draw()
F32 closest_dist_squared = F32_MAX; // value will be overridden in the loop
F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE);
+ LLVector3 pos_map;
+ uuid_vec_t avatar_ids;
+ std::vector<LLVector3d> positions;
+ bool unknown_relative_z;
+
+ LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgentCamera.getCameraPositionGlobal());
+
// Draw avatars
- for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
- iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ for (U32 i = 0; i < avatar_ids.size(); i++)
{
- LLViewerRegion* regionp = *iter;
- const LLVector3d& origin_global = regionp->getOriginGlobal();
-
- S32 count = regionp->mMapAvatars.count();
- S32 i;
- LLVector3 pos_local;
- U32 compact_local;
- U8 bits;
- // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
- // just be careful to sort the avatar IDs along with the positions. -MG
- for (i = 0; i < count; i++)
- {
- compact_local = regionp->mMapAvatars.get(i);
+ pos_map = globalPosToView(positions[i]);
+ LLUUID uuid = avatar_ids[i];
- bits = compact_local & 0xFF;
- pos_local.mV[VZ] = F32(bits) * 4.f;
- compact_local >>= 8;
+ bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
- bits = compact_local & 0xFF;
- pos_local.mV[VY] = (F32)bits;
- compact_local >>= 8;
+ LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
- bits = compact_local & 0xFF;
- pos_local.mV[VX] = (F32)bits;
+ unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z &&
+ camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z;
- pos_global.setVec( pos_local );
- pos_global += origin_global;
+ LLWorldMapView::drawAvatar(
+ pos_map.mV[VX], pos_map.mV[VY],
+ color,
+ pos_map.mV[VZ], mDotRadius,
+ unknown_relative_z);
- pos_map = globalPosToView(pos_global);
-
- LLUUID uuid(NULL);
- BOOL show_as_friend = FALSE;
- if( i < regionp->mMapAvatarIDs.count())
+ if(uuid.notNull())
+ {
+ bool selected = false;
+ uuid_vec_t::iterator sel_iter = gmSelected.begin();
+ for (; sel_iter != gmSelected.end(); sel_iter++)
{
- uuid = regionp->mMapAvatarIDs.get(i);
- show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
+ if(*sel_iter == uuid)
+ {
+ selected = true;
+ break;
+ }
}
-
- LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
- LLWorldMapView::drawAvatar(
- pos_map.mV[VX], pos_map.mV[VY],
- color,
- pos_map.mV[VZ], mDotRadius);
-
- if(uuid.notNull())
+ if(selected)
{
- bool selected = false;
- uuid_vec_t::iterator sel_iter = gmSelected.begin();
- for (; sel_iter != gmSelected.end(); sel_iter++)
+ if( (pos_map.mV[VX] < 0) ||
+ (pos_map.mV[VY] < 0) ||
+ (pos_map.mV[VX] >= getRect().getWidth()) ||
+ (pos_map.mV[VY] >= getRect().getHeight()) )
{
- if(*sel_iter == uuid)
- {
- selected = true;
- break;
- }
- }
- if(selected)
+ S32 x = llround( pos_map.mV[VX] );
+ S32 y = llround( pos_map.mV[VY] );
+ LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
+ } else
{
- if( (pos_map.mV[VX] < 0) ||
- (pos_map.mV[VY] < 0) ||
- (pos_map.mV[VX] >= getRect().getWidth()) ||
- (pos_map.mV[VY] >= getRect().getHeight()) )
- {
- S32 x = llround( pos_map.mV[VX] );
- S32 y = llround( pos_map.mV[VY] );
- LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
- } else
- {
- LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f);
- }
+ LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f);
}
}
+ }
- F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
- LLVector2(local_mouse_x,local_mouse_y));
- if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
- {
- closest_dist_squared = dist_to_cursor_squared;
- mClosestAgentToCursor = regionp->mMapAvatarIDs.get(i);
- }
+ F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
+ LLVector2(local_mouse_x,local_mouse_y));
+ if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
+ {
+ closest_dist_squared = dist_to_cursor_squared;
+ mClosestAgentToCursor = uuid;
}
}
@@ -440,7 +417,7 @@ void LLNetMap::draw()
}
// Draw dot for self avatar position
- pos_global = gAgent.getPositionGlobal();
+ LLVector3d pos_global = gAgent.getPositionGlobal();
pos_map = globalPosToView(pos_global);
S32 dot_width = llround(mDotRadius * 2.f);
LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
@@ -514,9 +491,11 @@ void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent)
createObjectImage();
}
-LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
+LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
{
- LLVector3d relative_pos_global = global_pos - gAgentCamera.getCameraPositionGlobal();
+ LLVector3d camera_position = gAgentCamera.getCameraPositionGlobal();
+
+ LLVector3d relative_pos_global = global_pos - camera_position;
LLVector3 pos_local;
pos_local.setVec(relative_pos_global); // convert to floats from doubles
@@ -541,7 +520,7 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
BOOL draw_arrow )
{
- LLVector3 pos_local = globalPosToView( pos_global );
+ LLVector3 pos_local = globalPosToView(pos_global);
if( (pos_local.mV[VX] < 0) ||
(pos_local.mV[VY] < 0) ||
(pos_local.mV[VX] >= getRect().getWidth()) ||
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index 20fcee0814..1f7e7d68c6 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -33,9 +33,9 @@
#include "v3dmath.h"
#include "v4color.h"
#include "llpointer.h"
+#include "llcoord.h"
class LLColor4U;
-class LLCoordGL;
class LLImageRaw;
class LLViewerTexture;
class LLFloaterMap;
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index cae7d02fed..89fe7bb3c2 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -51,8 +51,8 @@ LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsMo
p.channel_align = CA_CENTRE;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->getChannel(p);
- mChannel->setCanStoreToasts(false);
+ mChannel = LLChannelManager::getInstance()->getChannel(p)->getHandle();
+ mChannel.get()->setCanStoreToasts(false);
}
//--------------------------------------------------------------------------
@@ -64,13 +64,13 @@ LLAlertHandler::~LLAlertHandler()
void LLAlertHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().getWidth() / 2;
- mChannel->init(channel_right_bound, channel_right_bound);
+ mChannel.get()->init(channel_right_bound, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLAlertHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -81,7 +81,7 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -114,22 +114,22 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
// Show alert in middle of progress view (during teleport) (EXT-1093)
LLProgressView* progress = gViewerWindow->getProgressView();
LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled();
- mChannel->updatePositionAndSize(rc);
+ mChannel.get()->updatePositionAndSize(rc);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
}
else if (notify["sigtype"].asString() == "change")
{
LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog);
}
else
{
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->killToastByNotificationID(notification->getID());
}
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index 9b7fdaef82..ad51389241 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -42,10 +42,12 @@ LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1));
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -58,13 +60,13 @@ void LLGroupHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLGroupHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -75,7 +77,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -91,7 +93,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLGroupHandler::onDeleteToast, this, _1);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@@ -102,7 +104,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
}
else if (notify["sigtype"].asString() == "delete")
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 23dbb6b047..3569ad6447 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -103,8 +103,8 @@ protected:
// at the moment, when a handlers creates a channel.
virtual void initChannel()=0;
- LLScreenChannelBase* mChannel;
- e_notification_type mType;
+ LLHandle<LLScreenChannelBase> mChannel;
+ e_notification_type mType;
};
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 1b767e80d4..7c6287967a 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -64,7 +64,7 @@ LLSysHandler::LLSysHandler()
void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif)
{
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel.get());
if (channel == NULL)
{
return;
diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp
index 6105eff8ea..f792f53ac5 100644
--- a/indra/newview/llnotificationmanager.cpp
+++ b/indra/newview/llnotificationmanager.cpp
@@ -35,6 +35,7 @@
#include "llnotifications.h"
#include <boost/bind.hpp>
+#include <boost/foreach.hpp>
using namespace LLNotificationsUI;
@@ -48,6 +49,10 @@ LLNotificationManager::LLNotificationManager()
//--------------------------------------------------------------------------
LLNotificationManager::~LLNotificationManager()
{
+ BOOST_FOREACH(listener_pair_t& pair, mChannelListeners)
+ {
+ pair.second.disconnect();
+ }
}
//--------------------------------------------------------------------------
@@ -64,16 +69,16 @@ void LLNotificationManager::init()
LLNotificationChannel::buildChannel("Browser", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "browser"));
LLNotificationChannel::buildChannel("Outbox", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "outbox"));
- LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
- LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
- LLNotifications::instance().getChannel("Group Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
- LLNotifications::instance().getChannel("Alerts")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
- LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
- LLNotifications::instance().getChannel("IM Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
- LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
- LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1));
- LLNotifications::instance().getChannel("Browser")->connectChanged(boost::bind(&LLBrowserNotification::processNotification, LLBrowserNotification::getInstance(), _1));
- LLNotifications::instance().getChannel("Outbox")->connectChanged(boost::bind(&LLOutboxNotification::processNotification, LLOutboxNotification::getInstance(), _1));
+ mChannelListeners["Notifications"] = LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ mChannelListeners["NotificationTips"] = LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ mChannelListeners["Group Notifications"] = LLNotifications::instance().getChannel("Group Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ mChannelListeners["Alerts"] = LLNotifications::instance().getChannel("Alerts")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ mChannelListeners["AlertModal"] = LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ mChannelListeners["IM Notifications"] = LLNotifications::instance().getChannel("IM Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ mChannelListeners["Offer"] = LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ mChannelListeners["Hints"] = LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1));
+ mChannelListeners["Browser"] = LLNotifications::instance().getChannel("Browser")->connectChanged(boost::bind(&LLBrowserNotification::processNotification, LLBrowserNotification::getInstance(), _1));
+ mChannelListeners["Outbox"] = LLNotifications::instance().getChannel("Outbox")->connectChanged(boost::bind(&LLOutboxNotification::processNotification, LLOutboxNotification::getInstance(), _1));
mNotifyHandlers["notify"] = boost::shared_ptr<LLEventHandler>(new LLScriptHandler(NT_NOTIFY, LLSD()));
mNotifyHandlers["notifytip"] = boost::shared_ptr<LLEventHandler>(new LLTipHandler(NT_NOTIFY, LLSD()));
@@ -92,6 +97,9 @@ bool LLNotificationManager::onNotification(const LLSD& notify)
{
LLSysHandler* handle = NULL;
+ if (LLNotifications::destroyed())
+ return false;
+
LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
if (!notification)
diff --git a/indra/newview/llnotificationmanager.h b/indra/newview/llnotificationmanager.h
index 16e82e4cce..27b6ba1c71 100644
--- a/indra/newview/llnotificationmanager.h
+++ b/indra/newview/llnotificationmanager.h
@@ -28,6 +28,8 @@
#ifndef LL_LLNOTIFICATIONMANAGER_H
#define LL_LLNOTIFICATIONMANAGER_H
+#include "llevents.h"
+
#include "lluictrl.h"
#include "llnotificationhandler.h"
@@ -47,6 +49,7 @@ class LLToast;
class LLNotificationManager : public LLSingleton<LLNotificationManager>
{
typedef std::pair<std::string, LLEventHandler*> eventhandlers;
+ typedef std::pair<const std::string, LLBoundListener> listener_pair_t;
public:
LLNotificationManager();
virtual ~LLNotificationManager();
@@ -70,6 +73,8 @@ private:
//TODO (*)
std::map<std::string, boost::shared_ptr<LLEventHandler> > mNotifyHandlers;
// cruft std::map<std::string, LLChatHandler*> mChatHandlers;
+
+ std::map<std::string, LLBoundListener> mChannelListeners;
};
}
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 68fd65be0f..1552ed3346 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -45,12 +45,13 @@ LLOfferHandler::LLOfferHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
- mChannel->setControlHovering(true);
-
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
+ channel->setControlHovering(true);
channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1));
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -63,13 +64,13 @@ void LLOfferHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLOfferHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -80,7 +81,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -134,7 +135,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
// we not save offer notifications to the syswell floater that should be added to the IM floater
p.can_be_stored = !add_notid_to_im;
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@@ -175,7 +176,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
{
LLHandlerUtil::decIMMesageCounter(notification);
}
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
}
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index bbb4d03768..995915206b 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -47,13 +47,13 @@ LLScriptHandler::LLScriptHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
- mChannel->setControlHovering(true);
-
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
+ channel->setControlHovering(true);
channel->setOnRejectToastCallback(boost::bind(&LLScriptHandler::onRejectToast, this, _1));
-
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -66,13 +66,13 @@ void LLScriptHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLScriptHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -83,7 +83,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -109,7 +109,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
{
channel->addToast(p);
@@ -127,7 +127,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
}
else
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
}
return false;
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index fb0891c4c5..e397cfa046 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -46,11 +46,12 @@ LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
-
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
channel->setOnRejectToastCallback(boost::bind(&LLTipHandler::onRejectToast, this, _1));
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -63,13 +64,13 @@ void LLTipHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLTipHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -80,7 +81,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -137,13 +138,13 @@ bool LLTipHandler::processNotification(const LLSD& notify)
removeExclusiveNotifications(notification);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
}
else if (notify["sigtype"].asString() == "delete")
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index a4f6921f98..7301b305b2 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -875,8 +875,15 @@ void LLPanelFace::getState()
{
getChild<LLUICtrl>("TexScaleU")->setValue(2.0f * getChild<LLUICtrl>("TexScaleU")->getValue().asReal() );
getChild<LLUICtrl>("TexScaleV")->setValue(2.0f * getChild<LLUICtrl>("TexScaleV")->getValue().asReal() );
- }
+ // EXP-1507 (change label based on the mapping mode)
+ getChild<LLUICtrl>("rpt")->setValue(getString("string repeats per meter"));
+ }
+ else
+ if (selected_texgen == 0) // FIXME: should not be magic numbers
+ {
+ getChild<LLUICtrl>("rpt")->setValue(getString("string repeats per face"));
+ }
}
{
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index fbe331c7ab..f825ee3215 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -749,7 +749,10 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
{
- gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName());
+ if (mMembersList)
+ {
+ gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName());
+ }
}
BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 0295ad151f..eda0749cdb 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -374,7 +374,7 @@ void LLPanelGroupControlPanel::draw()
{
// Need to resort the participant list if it's in sort by recent speaker order.
if (mParticipantList)
- mParticipantList->updateRecentSpeakersOrder();
+ mParticipantList->update();
LLPanelChatControlPanel::draw();
}
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 058d1ad6bc..76aadcd913 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -216,6 +216,7 @@ void LLPanelLogin::addUsersWithFavoritesToUsername()
void LLPanelLogin::addFavoritesToStartLocation()
{
+ // Clear the combo.
LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
if (!combo) return;
int num_items = combo->getItemCount();
@@ -223,6 +224,10 @@ void LLPanelLogin::addFavoritesToStartLocation()
{
combo->remove(i);
}
+
+ // Load favorites into the combo.
+ std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
+ std::string canonical_user_name = canonicalize_username(user_defined_name);
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
LLSD fav_llsd;
llifstream file;
@@ -232,15 +237,18 @@ void LLPanelLogin::addFavoritesToStartLocation()
for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
iter != fav_llsd.endMap(); ++iter)
{
- std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
-
// The account name in stored_favorites.xml has Resident last name even if user has
// a single word account name, so it can be compared case-insensitive with the
// user defined "firstname lastname".
- S32 res = LLStringUtil::compareInsensitive(canonicalize_username(user_defined_name), iter->first);
- if (res != 0) continue;
+ S32 res = LLStringUtil::compareInsensitive(canonical_user_name, iter->first);
+ if (res != 0)
+ {
+ lldebugs << "Skipping favorites for " << iter->first << llendl;
+ continue;
+ }
combo->addSeparator();
+ lldebugs << "Loading favorites for " << iter->first << llendl;
LLSD user_llsd = iter->second;
for (LLSD::array_const_iterator iter1 = user_llsd.beginArray();
iter1 != user_llsd.endArray(); ++iter1)
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 374afb90be..c3c62920d3 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -567,7 +567,7 @@ void LLPanelMainInventory::updateItemcountText()
std::string text = "";
- if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive())
+ if (LLInventoryModelBackgroundFetch::instance().folderFetchActive())
{
text = getString("ItemcountFetching", string_args);
}
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 9c46f04abf..f1380e7a36 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1162,8 +1162,13 @@ void LLPanelPeople::onAddFriendWizButtonClicked()
{
// Show add friend wizard.
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE);
+ if (!picker)
+ {
+ return;
+ }
+
// Need to disable 'ok' button when friend occurs in selection
- if (picker) picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1));
+ picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1));
LLFloater* root_floater = gFloaterView->getParentFloater(this);
if (root_floater)
{
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 39c0628cbe..76d38f067d 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -818,7 +818,7 @@ bool LLPanelPrimMediaControls::isMouseOver()
LLCoordGL cursor_pos_gl;
S32 x, y;
getWindow()->getCursorPosition(&cursor_pos_window);
- getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl);
+ cursor_pos_gl = cursor_pos_window.convert();
if(mMediaControlsStack->getVisible())
{
diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h
index 66956181f2..eeb433e306 100644
--- a/indra/newview/llpanelprimmediacontrols.h
+++ b/indra/newview/llpanelprimmediacontrols.h
@@ -30,9 +30,9 @@
#include "llpanel.h"
#include "llviewermedia.h"
#include "llnotificationptr.h"
+#include "llcoord.h"
class LLButton;
-class LLCoordWindow;
class LLIconCtrl;
class LLLayoutStack;
class LLProgressBar;
diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp
index 4bbfec8ab7..5fec6d967d 100644
--- a/indra/newview/llpanelvoiceeffect.cpp
+++ b/indra/newview/llpanelvoiceeffect.cpp
@@ -123,7 +123,6 @@ void LLPanelVoiceEffect::update(bool list_updated)
if (mVoiceEffectCombo)
{
LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface();
- llassert(effect_interface);
if (!effect_interface) return;
if (list_updated)
{
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 5c95e805ce..975a6c67d8 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -390,7 +390,10 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param)
{
const LLPointer<LLSpeaker>& speakerp = *it;
- update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice);
+ if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
+ {
+ update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice);
+ }
}
}
}
@@ -466,12 +469,12 @@ void LLParticipantList::setValidateSpeakerCallback(validate_speaker_callback_t c
mValidateSpeakerCallback = cb;
}
-void LLParticipantList::updateRecentSpeakersOrder()
+void LLParticipantList::update()
{
+ mSpeakerMgr->update(true);
+
if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder() && !isHovered())
{
- // Need to update speakers to sort list correctly
- mSpeakerMgr->update(true);
// Resort avatar list
sort();
}
@@ -760,6 +763,7 @@ void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata,
LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(speaker_id);
if (speakerp.isNull())
{
+ LL_WARNS("Speakers") << "Speaker " << speaker_id << " not found" << llendl;
return;
}
LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id));
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index a001d29b67..53966c15fe 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -72,9 +72,9 @@ public:
const EParticipantSortOrder getSortOrder() const;
/**
- * Refreshes the participant list if it's in sort by recent speaker order.
+ * Refreshes the participant list.
*/
- void updateRecentSpeakersOrder();
+ void update();
/**
* Set a callback to be called before adding a speaker. Invalid speakers will not be added.
diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp
index 225ac6e224..fe4cc0f55f 100644
--- a/indra/newview/llplacesinventorybridge.cpp
+++ b/indra/newview/llplacesinventorybridge.cpp
@@ -89,7 +89,7 @@ void LLPlacesFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
std::vector<std::string> items;
std::vector<std::string> disabled_items;
- LLInventoryPanel* inv_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLInventoryPanel* inv_panel = mInventoryPanel.get();
bool is_open = false;
if (inv_panel)
{
@@ -137,7 +137,7 @@ void LLPlacesFolderBridge::performAction(LLInventoryModel* model, std::string ac
LLFolderViewFolder* LLPlacesFolderBridge::getFolder()
{
LLFolderViewFolder* folder = NULL;
- LLInventoryPanel* inv_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLInventoryPanel* inv_panel = mInventoryPanel.get();
if (inv_panel)
{
folder = dynamic_cast<LLFolderViewFolder*>(inv_panel->getRootFolder()->getItemByID(mUUID));
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp
index 9fbb67a63a..08829c1184 100644
--- a/indra/newview/llpopupview.cpp
+++ b/indra/newview/llpopupview.cpp
@@ -83,7 +83,7 @@ void LLPopupView::draw()
LLUI::pushMatrix();
{
- LLUI::translate( (F32) screen_x, (F32) screen_y, 0.f);
+ LLUI::translate( (F32) screen_x, (F32) screen_y);
popup->draw();
}
LLUI::popMatrix();
diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h
index 896e17c3c3..759430c3a5 100644
--- a/indra/newview/llpreview.h
+++ b/indra/newview/llpreview.h
@@ -32,6 +32,7 @@
#include "llpointer.h"
#include "lluuid.h"
#include "llinventoryobserver.h"
+#include "llextendedstatus.h"
#include <map>
class LLInventoryItem;
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 8e8b530e13..35ac0537a3 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -43,19 +43,7 @@ extern LLAgent gAgent;
LLPreviewAnim::LLPreviewAnim(const LLSD& key)
: LLPreview( key )
{
-}
-
-// static
-void LLPreviewAnim::endAnimCallback( void *userdata )
-{
- LLHandle<LLFloater>* handlep = ((LLHandle<LLFloater>*)userdata);
- LLFloater* self = handlep->get();
- delete handlep; // done with the handle
- if (self)
- {
- self->getChild<LLUICtrl>("Anim play btn")->setValue(FALSE);
- self->getChild<LLUICtrl>("Anim audition btn")->setValue(FALSE);
- }
+ mCommitCallbackRegistrar.add("PreviewAnim.Play", boost::bind(&LLPreviewAnim::play, this, _2));
}
// virtual
@@ -68,106 +56,115 @@ BOOL LLPreviewAnim::postBuild()
getChild<LLUICtrl>("desc")->setValue(item->getDescription());
}
- childSetAction("Anim play btn",playAnim, this);
- childSetAction("Anim audition btn",auditionAnim, this);
-
childSetCommitCallback("desc", LLPreview::onText, this);
getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
-
+
return LLPreview::postBuild();
}
-void LLPreviewAnim::activate(e_activation_type type)
+// static
+// llinventorybridge also calls into here
+void LLPreviewAnim::play(const LLSD& param)
{
- switch ( type )
+ const LLInventoryItem *item = getItem();
+
+ if(item)
{
- case PLAY:
+ LLUUID itemID=item->getAssetUUID();
+
+ std::string btn_name = param.asString();
+ LLButton* btn_inuse;
+ LLButton* btn_other;
+
+ if ("Inworld" == btn_name)
{
- playAnim( (void *) this );
- break;
+ btn_inuse = getChild<LLButton>("Inworld");
+ btn_other = getChild<LLButton>("Locally");
}
- case AUDITION:
+ else if ("Locally" == btn_name)
{
- auditionAnim( (void *) this );
- break;
+ btn_inuse = getChild<LLButton>("Locally");
+ btn_other = getChild<LLButton>("Inworld");
}
- default:
+ else
{
- //do nothing
+ return;
}
- }
-}
-
-// static
-void LLPreviewAnim::playAnim( void *userdata )
-{
- LLPreviewAnim* self = (LLPreviewAnim*) userdata;
- const LLInventoryItem *item = self->getItem();
- if(item)
- {
- LLUUID itemID=item->getAssetUUID();
+ if (btn_inuse)
+ {
+ btn_inuse->toggleState();
+ }
- LLButton* btn = self->getChild<LLButton>("Anim play btn");
- if (btn)
+ if (btn_other)
{
- btn->toggleState();
+ btn_other->setEnabled(false);
}
- if (self->getChild<LLUICtrl>("Anim play btn")->getValue().asBoolean() )
+ if (getChild<LLUICtrl>(btn_name)->getValue().asBoolean() )
{
- self->mPauseRequest = NULL;
- gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
+ if("Inworld" == btn_name)
+ {
+ gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
+ }
+ else
+ {
+ gAgentAvatarp->startMotion(item->getAssetUUID());
+ }
+
LLMotion* motion = gAgentAvatarp->findMotion(itemID);
if (motion)
{
- motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
+ mItemID = itemID;
+ mDidStart = false;
}
}
else
{
gAgentAvatarp->stopMotion(itemID);
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
+
+ if (btn_other)
+ {
+ btn_other->setEnabled(true);
+ }
}
}
}
-// static
-void LLPreviewAnim::auditionAnim( void *userdata )
+// virtual
+void LLPreviewAnim::draw()
{
- LLPreviewAnim* self = (LLPreviewAnim*) userdata;
- const LLInventoryItem *item = self->getItem();
-
- if(item)
+ LLPreview::draw();
+ if (!this->mItemID.isNull())
{
- LLUUID itemID=item->getAssetUUID();
-
- LLButton* btn = self->getChild<LLButton>("Anim audition btn");
- if (btn)
- {
- btn->toggleState();
- }
-
- if (self->getChild<LLUICtrl>("Anim audition btn")->getValue().asBoolean() )
+ LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID);
+ if (motion)
{
- self->mPauseRequest = NULL;
- gAgentAvatarp->startMotion(item->getAssetUUID());
- LLMotion* motion = gAgentAvatarp->findMotion(itemID);
-
- if (motion)
+ if (motion->isStopped() && this->mDidStart)
{
- motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
+ cleanup();
+ }
+ if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart)
+ {
+ this->mDidStart = true;
}
- }
- else
- {
- gAgentAvatarp->stopMotion(itemID);
- gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
}
}
}
// virtual
+void LLPreviewAnim::cleanup()
+{
+ this->mItemID = LLUUID::null;
+ this->mDidStart = false;
+ getChild<LLUICtrl>("Inworld")->setValue(FALSE);
+ getChild<LLUICtrl>("Locally")->setValue(FALSE);
+ getChild<LLUICtrl>("Inworld")->setEnabled(true);
+ getChild<LLUICtrl>("Locally")->setEnabled(true);
+}
+
+// virtual
void LLPreviewAnim::onClose(bool app_quitting)
{
const LLInventoryItem *item = getItem();
@@ -176,12 +173,5 @@ void LLPreviewAnim::onClose(bool app_quitting)
{
gAgentAvatarp->stopMotion(item->getAssetUUID());
gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP);
- LLMotion* motion = gAgentAvatarp->findMotion(item->getAssetUUID());
-
- if (motion)
- {
- // *TODO: minor memory leak here, user data is never deleted (Use real callbacks)
- motion->setDeactivateCallback(NULL, (void *)NULL);
- }
}
}
diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h
index 32e07ee33a..8eaed6ca1f 100644
--- a/indra/newview/llpreviewanim.h
+++ b/indra/newview/llpreviewanim.h
@@ -33,24 +33,18 @@
class LLPreviewAnim : public LLPreview
{
public:
- enum e_activation_type { NONE = 0, PLAY = 1, AUDITION = 2 };
- LLPreviewAnim(const LLSD& key);
- static void playAnim( void* userdata );
- static void auditionAnim( void* userdata );
- static void endAnimCallback( void *userdata );
+ LLPreviewAnim(const LLSD& key);
/*virtual*/ BOOL postBuild();
/*virtual*/ void onClose(bool app_quitting);
- void activate(e_activation_type type);
+ void draw();
+ void cleanup();
+ void play(const LLSD& param);
protected:
- LLAnimPauseRequest mPauseRequest;
- LLUUID mItemID;
- std::string mTitle;
- LLUUID mObjectID;
- LLButton* mPlayBtn;
- LLButton* mAuditionBtn;
+ LLUUID mItemID;
+ bool mDidStart;
};
-#endif // LL_LLPREVIEWSOUND_H
+#endif // LL_LLPREVIEWANIM_H
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 5301955964..d340b304ca 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -195,17 +195,18 @@ LLScreenChannel::~LLScreenChannel()
}
-std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher)
+std::list<const LLToast*> LLScreenChannel::findToasts(const Matcher& matcher)
{
- std::list<LLToast*> res;
+ std::list<const LLToast*> res;
// collect stored toasts
for (std::vector<ToastElem>::iterator it = mStoredToastList.begin(); it
!= mStoredToastList.end(); it++)
{
- if (matcher.matches(it->toast->getNotification()))
+ const LLToast* toast = it->getToast();
+ if (toast && matcher.matches(toast->getNotification()))
{
- res.push_back(it->toast);
+ res.push_back(toast);
}
}
@@ -213,9 +214,10 @@ std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher)
for (std::vector<ToastElem>::iterator it = mToastList.begin(); it
!= mToastList.end(); it++)
{
- if (matcher.matches(it->toast->getNotification()))
+ const LLToast* toast = it->getToast();
+ if (toast && matcher.matches(toast->getNotification()))
{
- res.push_back(it->toast);
+ res.push_back(toast);
}
}
@@ -260,15 +262,16 @@ void LLScreenChannel::addToast(const LLToast::Params& p)
return;
}
- ToastElem new_toast_elem(p);
+ LLToast* toast = new LLToast(p);
+ ToastElem new_toast_elem(toast->getHandle());
- new_toast_elem.toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, _1));
- new_toast_elem.toast->setOnToastDestroyedCallback(boost::bind(&LLScreenChannel::onToastDestroyed, this, _1));
+ toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, _1));
+ toast->setOnToastDestroyedCallback(boost::bind(&LLScreenChannel::onToastDestroyed, this, _1));
if(mControlHovering)
{
- new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
- new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopToastTimer, this, new_toast_elem.toast));
- new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startToastTimer, this, new_toast_elem.toast));
+ toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
+ toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopToastTimer, this, toast));
+ toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startToastTimer, this, toast));
}
if(show_toast)
@@ -340,13 +343,13 @@ void LLScreenChannel::onToastFade(LLToast* toast)
//--------------------------------------------------------------------------
void LLScreenChannel::deleteToast(LLToast* toast)
{
- if (toast->isDead())
+ if (!toast || toast->isDead())
{
return;
}
// send signal to observers about destroying of a toast
- toast->mOnDeleteToastSignal(toast);
+ toast->closeToast();
// update channel's Hovering state
// turning hovering off manually because onMouseLeave won't happen if a toast was closed using a keyboard
@@ -354,9 +357,6 @@ void LLScreenChannel::deleteToast(LLToast* toast)
{
mHoveredToast = NULL;
}
-
- // close the toast
- toast->closeFloater();
}
//--------------------------------------------------------------------------
@@ -364,12 +364,16 @@ void LLScreenChannel::deleteToast(LLToast* toast)
void LLScreenChannel::storeToast(ToastElem& toast_elem)
{
// do not store clones
- std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), toast_elem.id);
+ std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), toast_elem.getID());
if( it != mStoredToastList.end() )
return;
- mStoredToastList.push_back(toast_elem);
- mOnStoreToast(toast_elem.toast->getPanel(), toast_elem.id);
+ const LLToast* toast = toast_elem.getToast();
+ if (toast)
+ {
+ mStoredToastList.push_back(toast_elem);
+ mOnStoreToast(toast->getPanel(), toast->getNotificationID());
+ }
}
//--------------------------------------------------------------------------
@@ -382,9 +386,13 @@ void LLScreenChannel::loadStoredToastsToChannel()
for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it)
{
- (*it).toast->setIsHidden(false);
- (*it).toast->startTimer();
- mToastList.push_back((*it));
+ LLToast* toast = it->getToast();
+ if (toast)
+ {
+ toast->setIsHidden(false);
+ toast->startTimer();
+ mToastList.push_back(*it);
+ }
}
mStoredToastList.clear();
@@ -399,17 +407,19 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id)
if( it == mStoredToastList.end() )
return;
- LLToast* toast = (*it).toast;
-
- if(toast->getVisible())
+ LLToast* toast = it->getToast();
+ if (toast)
{
- // toast is already in channel
- return;
- }
+ if(toast->getVisible())
+ {
+ // toast is already in channel
+ return;
+ }
- toast->setIsHidden(false);
- toast->startTimer();
- mToastList.push_back((*it));
+ toast->setIsHidden(false);
+ toast->startTimer();
+ mToastList.push_back(*it);
+ }
redrawToasts();
}
@@ -423,9 +433,19 @@ void LLScreenChannel::removeStoredToastByNotificationID(LLUUID id)
if( it == mStoredToastList.end() )
return;
- LLToast* toast = (*it).toast;
- mStoredToastList.erase(it);
- mRejectToastSignal(toast->getNotificationID());
+ const LLToast* toast = it->getToast();
+ if (toast)
+ {
+ mRejectToastSignal(toast->getNotificationID());
+ }
+
+ // Call find() once more, because the mStoredToastList could have been changed
+ // in mRejectToastSignal callback and the iterator could have become invalid.
+ it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
+ if (it != mStoredToastList.end())
+ {
+ mStoredToastList.erase(it);
+ }
}
//--------------------------------------------------------------------------
@@ -436,21 +456,22 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id)
if( it != mToastList.end())
{
- LLToast* toast = (*it).toast;
+ LLToast* toast = it->getToast();
// if it is a notification toast and notification is UnResponded - then respond on it
// else - simply destroy a toast
//
// NOTE: if a notification is unresponded this function will be called twice for the same toast.
// At first, the notification will be discarded, at second (it will be caused by discarding),
// the toast will be destroyed.
- if(toast->isNotificationValid())
+ if(toast && toast->isNotificationValid())
{
mRejectToastSignal(toast->getNotificationID());
}
else
{
- mToastList.erase(it);
+
deleteToast(toast);
+ mToastList.erase(it);
redrawToasts();
}
return;
@@ -459,20 +480,31 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id)
// searching among stored toasts
it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
- if( it != mStoredToastList.end() )
+ if (it != mStoredToastList.end())
+ {
+ LLToast* toast = it->getToast();
+ if (toast)
+ {
+ // send signal to a listener to let him perform some action on toast rejecting
+ mRejectToastSignal(toast->getNotificationID());
+ deleteToast(toast);
+ }
+ }
+
+ // Call find() once more, because the mStoredToastList could have been changed
+ // in mRejectToastSignal callback and the iterator could have become invalid.
+ it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
+ if (it != mStoredToastList.end())
{
- LLToast* toast = (*it).toast;
mStoredToastList.erase(it);
- // send signal to a listener to let him perform some action on toast rejecting
- mRejectToastSignal(toast->getNotificationID());
- deleteToast(toast);
}
+
}
void LLScreenChannel::killMatchedToasts(const Matcher& matcher)
{
- std::list<LLToast*> to_delete = findToasts(matcher);
- for (std::list<LLToast*>::iterator it = to_delete.begin(); it
+ std::list<const LLToast*> to_delete = findToasts(matcher);
+ for (std::list<const LLToast*>::iterator it = to_delete.begin(); it
!= to_delete.end(); it++)
{
killToastByNotificationID((*it)-> getNotificationID());
@@ -486,12 +518,15 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
if( it != mToastList.end() && panel)
{
- LLToast* toast = (*it).toast;
- LLPanel* old_panel = toast->getPanel();
- toast->removeChild(old_panel);
- delete old_panel;
- toast->insertPanel(panel);
- toast->startTimer();
+ LLToast* toast = it->getToast();
+ if (toast)
+ {
+ LLPanel* old_panel = toast->getPanel();
+ toast->removeChild(old_panel);
+ delete old_panel;
+ toast->insertPanel(panel);
+ toast->startTimer();
+ }
redrawToasts();
}
}
@@ -540,16 +575,29 @@ void LLScreenChannel::showToastsBottom()
{
if(it != mToastList.rbegin())
{
- LLToast* toast = (*(it-1)).toast;
+ LLToast* toast = (it-1)->getToast();
+ if (!toast)
+ {
+ llwarns << "Attempt to display a deleted toast." << llendl;
+ return;
+ }
+
bottom = toast->getRect().mTop - toast->getTopPad();
toast_margin = gSavedSettings.getS32("ToastGap");
}
- toast_rect = (*it).toast->getRect();
+ LLToast* toast = it->getToast();
+ if(!toast)
+ {
+ llwarns << "Attempt to display a deleted toast." << llendl;
+ return;
+ }
+
+ toast_rect = toast->getRect();
toast_rect.setOriginAndSize(getRect().mRight - toast_rect.getWidth(),
bottom + toast_margin, toast_rect.getWidth(),
toast_rect.getHeight());
- (*it).toast->setRect(toast_rect);
+ toast->setRect(toast_rect);
if(floater && floater->overlapsScreenChannel())
{
@@ -561,7 +609,7 @@ void LLScreenChannel::showToastsBottom()
{
shift += floater->getDockControl()->getTongueHeight();
}
- (*it).toast->translate(0, shift);
+ toast->translate(0, shift);
}
LLRect channel_rect = getChannelRect();
@@ -572,13 +620,13 @@ void LLScreenChannel::showToastsBottom()
}
}
- bool stop_showing_toasts = (*it).toast->getRect().mTop > getRect().mTop;
+ bool stop_showing_toasts = toast->getRect().mTop > getRect().mTop;
if(!stop_showing_toasts)
{
if( it != mToastList.rend()-1)
{
- S32 toast_top = (*it).toast->getRect().mTop + gSavedSettings.getS32("ToastGap");
+ S32 toast_top = toast->getRect().mTop + gSavedSettings.getS32("ToastGap");
stop_showing_toasts = toast_top > getRect().mTop;
}
}
@@ -592,17 +640,17 @@ void LLScreenChannel::showToastsBottom()
if(stop_showing_toasts)
break;
- if( !(*it).toast->getVisible() )
+ if( !toast->getVisible() )
{
// HACK
// EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
- (*it).toast->setVisible(TRUE);
+ toast->setVisible(TRUE);
}
- if(!(*it).toast->hasFocus())
+ if(!toast->hasFocus())
{
// Fixing Z-order of toasts (EXT-4862)
// Next toast will be positioned under this one.
- gFloaterView->sendChildToBack((*it).toast);
+ gFloaterView->sendChildToBack(toast);
}
}
@@ -612,7 +660,11 @@ void LLScreenChannel::showToastsBottom()
mHiddenToastsNum = 0;
for(; it != mToastList.rend(); it++)
{
- (*it).toast->hide();
+ LLToast* toast = it->getToast();
+ if (toast)
+ {
+ toast->hide();
+ }
}
}
}
@@ -620,17 +672,31 @@ void LLScreenChannel::showToastsBottom()
//--------------------------------------------------------------------------
void LLScreenChannel::showToastsCentre()
{
- LLRect toast_rect;
- S32 bottom = (getRect().mTop - getRect().mBottom)/2 + mToastList[0].toast->getRect().getHeight()/2;
+ LLToast* toast = mToastList[0].getToast();
+ if (!toast)
+ {
+ llwarns << "Attempt to display a deleted toast." << llendl;
+ return;
+ }
+
+ LLRect toast_rect;
+ S32 bottom = (getRect().mTop - getRect().mBottom)/2 + toast->getRect().getHeight()/2;
std::vector<ToastElem>::reverse_iterator it;
for(it = mToastList.rbegin(); it != mToastList.rend(); ++it)
{
- toast_rect = (*it).toast->getRect();
+ LLToast* toast = it->getToast();
+ if (!toast)
+ {
+ llwarns << "Attempt to display a deleted toast." << llendl;
+ return;
+ }
+
+ toast_rect = toast->getRect();
toast_rect.setLeftTopAndSize(getRect().mLeft - toast_rect.getWidth() / 2, bottom + toast_rect.getHeight() / 2 + gSavedSettings.getS32("ToastGap"), toast_rect.getWidth() ,toast_rect.getHeight());
- (*it).toast->setRect(toast_rect);
+ toast->setRect(toast_rect);
- (*it).toast->setVisible(TRUE);
+ toast->setVisible(TRUE);
}
}
@@ -652,16 +718,29 @@ void LLScreenChannel::showToastsTop()
{
if(it != mToastList.rbegin())
{
- LLToast* toast = (*(it-1)).toast;
+ LLToast* toast = (it-1)->getToast();
+ if (!toast)
+ {
+ llwarns << "Attempt to display a deleted toast." << llendl;
+ return;
+ }
+
top = toast->getRect().mBottom - toast->getTopPad();
toast_margin = gSavedSettings.getS32("ToastGap");
}
- toast_rect = (*it).toast->getRect();
+ LLToast* toast = it->getToast();
+ if (!toast)
+ {
+ llwarns << "Attempt to display a deleted toast." << llendl;
+ return;
+ }
+
+ toast_rect = toast->getRect();
toast_rect.setLeftTopAndSize(channel_rect.mRight - toast_rect.getWidth(),
top, toast_rect.getWidth(),
toast_rect.getHeight());
- (*it).toast->setRect(toast_rect);
+ toast->setRect(toast_rect);
if(floater && floater->overlapsScreenChannel())
{
@@ -673,7 +752,7 @@ void LLScreenChannel::showToastsTop()
{
shift -= floater->getDockControl()->getTongueHeight();
}
- (*it).toast->translate(0, shift);
+ toast->translate(0, shift);
}
LLRect channel_rect = getChannelRect();
@@ -684,13 +763,13 @@ void LLScreenChannel::showToastsTop()
}
}
- bool stop_showing_toasts = (*it).toast->getRect().mBottom < channel_rect.mBottom;
+ bool stop_showing_toasts = toast->getRect().mBottom < channel_rect.mBottom;
if(!stop_showing_toasts)
{
if( it != mToastList.rend()-1)
{
- S32 toast_bottom = (*it).toast->getRect().mBottom - gSavedSettings.getS32("ToastGap");
+ S32 toast_bottom = toast->getRect().mBottom - gSavedSettings.getS32("ToastGap");
stop_showing_toasts = toast_bottom < channel_rect.mBottom;
}
}
@@ -704,29 +783,41 @@ void LLScreenChannel::showToastsTop()
if(stop_showing_toasts)
break;
- if( !(*it).toast->getVisible() )
+ if (!toast->getVisible())
{
// HACK
// EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
- (*it).toast->setVisible(TRUE);
+ toast->setVisible(TRUE);
}
- if(!(*it).toast->hasFocus())
+ if (!toast->hasFocus())
{
// Fixing Z-order of toasts (EXT-4862)
// Next toast will be positioned under this one.
- gFloaterView->sendChildToBack((*it).toast);
+ gFloaterView->sendChildToBack(toast);
}
}
// Dismiss toasts we don't have space for (STORM-391).
+ std::vector<LLToast*> toasts_to_hide;
if(it != mToastList.rend())
{
mHiddenToastsNum = 0;
for(; it != mToastList.rend(); it++)
{
- (*it).toast->hide();
+ LLToast* toast = it->getToast();
+ if (toast)
+ {
+ toasts_to_hide.push_back(toast);
+ }
}
}
+
+ for (std::vector<LLToast*>::iterator it = toasts_to_hide.begin(), end_it = toasts_to_hide.end();
+ it != end_it;
+ ++it)
+ {
+ (*it)->hide();
+ }
}
//--------------------------------------------------------------------------
@@ -827,7 +918,17 @@ void LLNotificationsUI::LLScreenChannel::startToastTimer(LLToast* toast)
void LLScreenChannel::hideToastsFromScreen()
{
for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
- (*it).toast->setVisible(FALSE);
+ {
+ LLToast* toast = it->getToast();
+ if (toast)
+ {
+ toast->setVisible(FALSE);
+ }
+ else
+ {
+ llwarns << "Attempt to hide a deleted toast." << llendl;
+ }
+ }
}
//--------------------------------------------------------------------------
@@ -836,8 +937,15 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id)
std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), notification_id);
if(mToastList.end() != it)
{
- ToastElem te = *it;
- te.toast->hide();
+ LLToast* toast = it->getToast();
+ if (toast)
+ {
+ toast->hide();
+ }
+ else
+ {
+ llwarns << "Attempt to hide a deleted toast." << llendl;
+ }
}
}
@@ -845,24 +953,25 @@ void LLScreenChannel::closeHiddenToasts(const Matcher& matcher)
{
// since we can't guarantee that close toast operation doesn't change mToastList
// we collect matched toasts that should be closed into separate list
- std::list<ToastElem> toasts;
+ std::list<LLToast*> toasts;
for (std::vector<ToastElem>::iterator it = mToastList.begin(); it
!= mToastList.end(); it++)
{
- LLToast * toast = it->toast;
+ LLToast* toast = it->getToast();
// add to list valid toast that match to provided matcher criteria
if (toast != NULL && !toast->isDead() && toast->getNotification() != NULL
&& !toast->getVisible() && matcher.matches(toast->getNotification()))
{
- toasts.push_back(*it);
+ toasts.push_back(toast);
}
}
// close collected toasts
- for (std::list<ToastElem>::iterator it = toasts.begin(); it
+ for (std::list<LLToast*>::iterator it = toasts.begin(); it
!= toasts.end(); it++)
{
- it->toast->closeFloater();
+ LLToast* toast = *it;
+ toast->closeFloater();
}
}
@@ -872,7 +981,7 @@ void LLScreenChannel::removeToastsFromChannel()
hideToastsFromScreen();
for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
{
- deleteToast((*it).toast);
+ deleteToast(it->getToast());
}
mToastList.clear();
}
@@ -886,9 +995,10 @@ void LLScreenChannel::removeAndStoreAllStorableToasts()
hideToastsFromScreen();
for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end();)
{
- if((*it).toast->getCanBeStored())
+ LLToast* toast = it->getToast();
+ if(toast && toast->getCanBeStored())
{
- storeToast(*(it));
+ storeToast(*it);
it = mToastList.erase(it);
}
else
@@ -908,9 +1018,10 @@ void LLScreenChannel::removeToastsBySessionID(LLUUID id)
hideToastsFromScreen();
for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end();)
{
- if((*it).toast->getSessionID() == id)
+ LLToast* toast = it->getToast();
+ if(toast && toast->getSessionID() == id)
{
- deleteToast((*it).toast);
+ deleteToast(toast);
it = mToastList.erase(it);
}
else
@@ -968,5 +1079,5 @@ LLToast* LLScreenChannel::getToastByNotificationID(LLUUID id)
if (it == mStoredToastList.end())
return NULL;
- return it->toast;
+ return it->getToast();
}
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index c9f8855fe6..56a9cf8b4b 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -117,7 +117,7 @@ public:
// get ID of a channel
LLUUID getChannelID() { return mID; }
- LLHandle<LLScreenChannelBase> getHandle() { mRootHandle.bind(this); return mRootHandle; }
+ LLHandle<LLScreenChannelBase> getHandle() { return getDerivedHandle<LLScreenChannelBase>(); }
protected:
void updateRect();
@@ -130,7 +130,6 @@ protected:
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
bool mShowToasts;
- LLRootHandle<LLScreenChannelBase> mRootHandle;
//
EToastAlignment mToastAlignment;
EChannelAlignment mChannelAlignment;
@@ -163,7 +162,7 @@ public:
virtual bool matches(const LLNotificationPtr) const = 0;
};
- std::list<LLToast*> findToasts(const Matcher& matcher);
+ std::list<const LLToast*> findToasts(const Matcher& matcher);
// Channel's outfit-functions
// update channel's size and position in the World View
@@ -238,31 +237,39 @@ public:
reject_tost_signal_t mRejectToastSignal; boost::signals2::connection setOnRejectToastCallback(reject_tost_callback_t cb) { return mRejectToastSignal.connect(cb); }
private:
- struct ToastElem
+ class ToastElem
{
- LLUUID id;
- LLToast* toast;
+ public:
+ ToastElem(const LLHandle<LLToast>& toast) : mToast(toast)
+ {
+ }
- ToastElem(LLToast::Params p) : id(p.notif_id)
+ ToastElem(const ToastElem& toast_elem) : mToast(toast_elem.mToast)
{
- toast = new LLToast(p);
}
- ToastElem(const ToastElem& toast_elem)
+ LLToast* getToast() const
{
- id = toast_elem.id;
- toast = toast_elem.toast;
+ return mToast.get();
+ }
+
+ LLUUID getID() const
+ {
+ return mToast.isDead() ? LLUUID() : mToast.get()->getNotificationID();
}
bool operator == (const LLUUID &id_op) const
{
- return (id == id_op);
+ return (getID() == id_op);
}
bool operator == (LLPanel* panel_op) const
{
- return (toast == panel_op);
+ return (mToast.get() == panel_op);
}
+
+ private:
+ LLHandle<LLToast> mToast;
};
// Channel's handlers
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 8d64c8c04f..30400a4c6a 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1360,7 +1360,11 @@ void LLSecAPIBasicHandler::_writeProtectedData()
// (even though this file isn't really secure. Perhaps in the future
// it may be, however.
LLFile::remove(tmp_filename);
- throw LLProtectedDataException("Error writing Protected Data Store");
+
+ // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
+ // Decided throwing an exception here was overkill until we figure out why this happens
+ //throw LLProtectedDataException("Error writing Protected Data Store");
+ llinfos << "LLProtectedDataException(Error writing Protected Data Store)" << llendl;
}
// move the temporary file to the specified file location.
@@ -1369,7 +1373,11 @@ void LLSecAPIBasicHandler::_writeProtectedData()
(LLFile::rename(tmp_filename, mProtectedDataFilename)))
{
LLFile::remove(tmp_filename);
- throw LLProtectedDataException("Could not overwrite protected data store");
+
+ // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
+ // Decided throwing an exception here was overkill until we figure out why this happens
+ //throw LLProtectedDataException("Could not overwrite protected data store");
+ llinfos << "LLProtectedDataException(Could not overwrite protected data store)" << llendl;
}
}
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 038b18afbd..c8b67cc9ec 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -217,15 +217,17 @@ BOOL LLSidepanelInventory::postBuild()
{
LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
- // Collapse inbox panel
- inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true);
-
// Set up button states and callbacks
LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME);
- inbox_button->setToggleState(false);
inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this));
+ // Get the previous inbox state from "InventoryInboxToggleState" setting.
+ bool is_inbox_collapsed = !inbox_button->getToggleState();
+
+ // Restore the collapsed inbox panel state
+ inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), is_inbox_collapsed);
+
// Set the inbox visible based on debug settings (final setting comes from http request below)
enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index c588bd8fb4..07d2f1ad6f 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -272,6 +272,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin
speakerp->mStatus = status;
mSpeakers.insert(std::make_pair(speakerp->mID, speakerp));
mSpeakersSorted.push_back(speakerp);
+ LL_DEBUGS("Speakers") << "Added speaker " << id << llendl;
fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add");
}
else
@@ -290,6 +291,10 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin
speakerp->lookupName();
}
}
+ else
+ {
+ LL_WARNS("Speakers") << "Speaker " << id << " not found" << llendl;
+ }
}
mSpeakerDelayRemover->unsetActionTimer(speakerp->mID);
@@ -354,6 +359,7 @@ void LLSpeakerMgr::update(BOOL resort_ok)
if (moderator_muted_voice != speakerp->mModeratorMutedVoice)
{
speakerp->mModeratorMutedVoice = moderator_muted_voice;
+ LL_DEBUGS("Speakers") << (speakerp->mModeratorMutedVoice? "Muted" : "Umuted") << " speaker " << speaker_id<< llendl;
speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp));
}
@@ -484,6 +490,7 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
}
}
+ LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << llendl;
fireEvent(new LLSpeakerListChangeEvent(this, speaker_id), "remove");
update(TRUE);
@@ -595,7 +602,10 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers)
speaker_it->second["mutes"]["text"];
// Fire event only if moderator changed
if ( is_moderator != speakerp->mIsModerator )
+ {
+ LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl;
fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator");
+ }
}
}
}
@@ -665,7 +675,10 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
speakerp->mIsModerator = agent_info["is_moderator"];
// Fire event only if moderator changed
if ( is_moderator != speakerp->mIsModerator )
+ {
+ LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl;
fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator");
+ }
}
if (agent_info.has("mutes"))
@@ -857,6 +870,7 @@ void LLActiveSpeakerMgr::updateSpeakerList()
// always populate from active voice channel
if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) //MA: seems this is always false
{
+ LL_DEBUGS("Speakers") << "Removed all speakers" << llendl;
fireEvent(new LLSpeakerListChangeEvent(this, LLUUID::null), "clear");
mSpeakers.clear();
mSpeakersSorted.clear();
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index 35f2ee7056..b9358cf37c 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -208,6 +208,8 @@ private:
class LLSpeakerMgr : public LLOldEvents::LLObservable
{
+ LOG_CLASS(LLSpeakerMgr);
+
public:
LLSpeakerMgr(LLVoiceChannel* channelp);
virtual ~LLSpeakerMgr();
@@ -271,6 +273,8 @@ protected:
class LLIMSpeakerMgr : public LLSpeakerMgr
{
+ LOG_CLASS(LLIMSpeakerMgr);
+
public:
LLIMSpeakerMgr(LLVoiceChannel* channel);
@@ -320,6 +324,8 @@ protected:
class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr>
{
+ LOG_CLASS(LLActiveSpeakerMgr);
+
public:
LLActiveSpeakerMgr();
protected:
@@ -328,6 +334,7 @@ protected:
class LLLocalSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLLocalSpeakerMgr>
{
+ LOG_CLASS(LLLocalSpeakerMgr);
public:
LLLocalSpeakerMgr();
~LLLocalSpeakerMgr ();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 8586900b9c..6b0fc26db7 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -881,7 +881,6 @@ bool idle_startup()
LLFile::mkdir(gDirUtilp->getLindenUserDir());
// Set PerAccountSettingsFile to the default value.
- std::string per_account_settings_file = LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount");
gSavedSettings.setString("PerAccountSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,
LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount")));
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index de22f2ae6b..19a944e88e 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -922,13 +922,20 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
S32 image_top = getRect().getHeight();
S32 image_bottom = BTN_HEIGHT_SMALL;
S32 image_middle = (image_top + image_bottom) / 2;
- S32 line_height = llround(LLFontGL::getFontSansSerifSmall()->getLineHeight());
+ S32 line_height = LLFontGL::getFontSansSerifSmall()->getLineHeight();
LLTextBox::Params tentative_label_p(p.multiselect_text);
tentative_label_p.name("Multiple");
tentative_label_p.rect(LLRect (0, image_middle + line_height / 2, getRect().getWidth(), image_middle - line_height / 2 ));
tentative_label_p.follows.flags(FOLLOWS_ALL);
mTentativeLabel = LLUICtrlFactory::create<LLTextBox> (tentative_label_p);
+
+ // It is no longer possible to associate a style with a textbox, so it has to be done in this fashion
+ LLStyle::Params style_params;
+ style_params.color = LLColor4::white;
+
+ mTentativeLabel->setText(LLTrans::getString("multiple_textures"), style_params);
+ mTentativeLabel->setHAlign(LLFontGL::HCENTER);
addChild( mTentativeLabel );
LLRect border_rect = getLocalRect();
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index bcebac712c..f24c6c6424 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -54,7 +54,9 @@
#include "llworld.h"
#include "llsdutil.h"
#include "llstartup.h"
+#include "llviewerstats.h"
+bool LLTextureFetchDebugger::sDebuggerEnabled = false ;
LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128);
LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128);
@@ -63,6 +65,7 @@ class LLTextureFetchWorker : public LLWorkerClass
{
friend class LLTextureFetch;
friend class HTTPGetResponder;
+ friend class LLTextureFetchDebugger;
private:
class CacheReadResponder : public LLTextureCache::ReadResponder
@@ -265,6 +268,7 @@ private:
BOOL mNeedsAux;
BOOL mHaveAllData;
BOOL mInLocalCache;
+ BOOL mInCache;
bool mCanUseHTTP ;
bool mCanUseNET ; //can get from asset server.
S32 mHTTPFailCount;
@@ -677,6 +681,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mNeedsAux(FALSE),
mHaveAllData(FALSE),
mInLocalCache(FALSE),
+ mInCache(FALSE),
mCanUseHTTP(true),
mHTTPFailCount(0),
mRetryAttempt(0),
@@ -907,6 +912,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mCacheReadHandle = LLTextureCache::nullHandle();
mCacheWriteHandle = LLTextureCache::nullHandle();
mState = LOAD_FROM_TEXTURE_CACHE;
+ mInCache = FALSE;
mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE
LL_DEBUGS("Texture") << mID << ": Priority: " << llformat("%8.0f",mImagePriority)
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
@@ -995,6 +1001,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
llassert_always(mFormattedImage->getDataSize() > 0);
mLoadedDiscard = mDesiredDiscard;
mState = DECODE_IMAGE;
+ mInCache = TRUE;
mWriteToCacheState = NOT_WRITE ;
LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
@@ -1425,6 +1432,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
if (mDecoded)
{
+ if(mFetcher->getFetchDebugger() && !mInLocalCache)
+ {
+ mFetcher->getFetchDebugger()->addHistoryEntry(this);
+ }
+
if (mDecodedDiscard < 0)
{
LL_DEBUGS("Texture") << mID << ": Failed to Decode." << LL_ENDL;
@@ -1854,11 +1866,18 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mHTTPTextureBits(0),
mTotalHTTPRequests(0),
mCurlGetRequest(NULL),
- mQAMode(qa_mode)
+ mQAMode(qa_mode),
+ mFetchDebugger(NULL)
{
mCurlPOSTRequestCount = 0;
mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), gSavedSettings.getU32("TextureLoggingThreshold"));
+
+ LLTextureFetchDebugger::sDebuggerEnabled = gSavedSettings.getBOOL("TextureFetchDebuggerEnabled");
+ if(LLTextureFetchDebugger::isEnabled())
+ {
+ mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ;
+ }
}
LLTextureFetch::~LLTextureFetch()
@@ -1873,11 +1892,17 @@ LLTextureFetch::~LLTextureFetch()
}
// ~LLQueuedThread() called here
+
+ delete mFetchDebugger;
}
bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority,
S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http)
{
+ if(mFetcherLocked)
+ {
+ return false;
+ }
if (mDebugPause)
{
return false;
@@ -2301,6 +2326,11 @@ void LLTextureFetch::startThread()
{
// Construct mCurlGetRequest from Worker Thread
mCurlGetRequest = new LLCurlRequest();
+
+ if(mFetchDebugger)
+ {
+ mFetchDebugger->setCurlGetRequest(mCurlGetRequest);
+ }
}
// WORKER THREAD
@@ -2309,6 +2339,10 @@ void LLTextureFetch::endThread()
// Destroy mCurlGetRequest from Worker Thread
delete mCurlGetRequest;
mCurlGetRequest = NULL;
+ if(mFetchDebugger)
+ {
+ mFetchDebugger->setCurlGetRequest(NULL);
+ }
}
// WORKER THREAD
@@ -2846,7 +2880,6 @@ void LLTextureFetch::cmdDoWork()
}
}
-
//////////////////////////////////////////////////////////////////////////////
// Private (anonymous) class methods implementing the command scheme.
@@ -3050,5 +3083,659 @@ truncate_viewer_metrics(int max_regions, LLSD & metrics)
} // end of anonymous namespace
+///////////////////////////////////////////////////////////////////////////////////////////
+//Start LLTextureFetchDebugger
+///////////////////////////////////////////////////////////////////////////////////////////
+//---------------------
+class LLDebuggerCacheReadResponder : public LLTextureCache::ReadResponder
+{
+public:
+ LLDebuggerCacheReadResponder(LLTextureFetchDebugger* debugger, S32 id, LLImageFormatted* image)
+ : mDebugger(debugger), mID(id)
+ {
+ setImage(image);
+ }
+ virtual void completed(bool success)
+ {
+ mDebugger->callbackCacheRead(mID, success, mFormattedImage, mImageSize, mImageLocal);
+ }
+private:
+ LLTextureFetchDebugger* mDebugger;
+ S32 mID;
+};
+
+class LLDebuggerCacheWriteResponder : public LLTextureCache::WriteResponder
+{
+public:
+ LLDebuggerCacheWriteResponder(LLTextureFetchDebugger* debugger, S32 id)
+ : mDebugger(debugger), mID(id)
+ {
+ }
+ virtual void completed(bool success)
+ {
+ mDebugger->callbackCacheWrite(mID, success);
+ }
+private:
+ LLTextureFetchDebugger* mDebugger;
+ S32 mID;
+};
+
+class LLDebuggerDecodeResponder : public LLImageDecodeThread::Responder
+{
+public:
+ LLDebuggerDecodeResponder(LLTextureFetchDebugger* debugger, S32 id)
+ : mDebugger(debugger), mID(id)
+ {
+ }
+ virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux)
+ {
+ mDebugger->callbackDecoded(mID, success, raw, aux);
+ }
+private:
+ LLTextureFetchDebugger* mDebugger;
+ S32 mID;
+};
+
+class LLDebuggerHTTPResponder : public LLCurl::Responder
+{
+public:
+ LLDebuggerHTTPResponder(LLTextureFetchDebugger* debugger, S32 index)
+ : mDebugger(debugger), mIndex(index)
+ {
+ }
+ virtual void completedRaw(U32 status, const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+ {
+ bool success = false;
+ bool partial = false;
+ if (HTTP_OK <= status && status < HTTP_MULTIPLE_CHOICES)
+ {
+ success = true;
+ if (HTTP_PARTIAL_CONTENT == status) // partial information
+ {
+ partial = true;
+ }
+ }
+ if (!success)
+ {
+ llinfos << "Fetch Debugger : CURL GET FAILED, index = " << mIndex << ", status:" << status << " reason:" << reason << llendl;
+ }
+ mDebugger->callbackHTTP(mIndex, channels, buffer, partial, success);
+ }
+ virtual bool followRedir()
+ {
+ return true;
+ }
+private:
+ LLTextureFetchDebugger* mDebugger;
+ S32 mIndex;
+};
+
+LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) :
+ mFetcher(fetcher),
+ mTextureCache(cache),
+ mImageDecodeThread(imagedecodethread),
+ mCurlGetRequest(NULL)
+{
+ init();
+}
+
+LLTextureFetchDebugger::~LLTextureFetchDebugger()
+{
+ mFetchingHistory.clear();
+ stopDebug();
+}
+
+void LLTextureFetchDebugger::init()
+{
+ mState = IDLE;
+
+ mCacheReadTime = -1.f;
+ mCacheWriteTime = -1.f;
+ mDecodingTime = -1.f;
+ mHTTPTime = -1.f;
+ mGLCreationTime = -1.f;
+ mTotalFetchingTime = 0.f;
+ mRefetchVisCacheTime = -1.f;
+ mRefetchVisHTTPTime = -1.f;
+
+ mNumFetchedTextures = 0;
+ mNumCacheHits = 0;
+ mNumVisibleFetchedTextures = 0;
+ mNumVisibleFetchingRequests = 0;
+ mFetchedData = 0;
+ mDecodedData = 0;
+ mVisibleFetchedData = 0;
+ mVisibleDecodedData = 0;
+ mRenderedData = 0;
+ mRenderedDecodedData = 0;
+ mFetchedPixels = 0;
+ mRenderedPixels = 0;
+ mRefetchedData = 0;
+ mRefetchedPixels = 0;
+
+ mFreezeHistory = FALSE;
+}
+
+void LLTextureFetchDebugger::startDebug()
+{
+ //lock the fetcher
+ mFetcher->lockFetcher(true);
+ mFreezeHistory = TRUE;
+
+ //clear the current fetching queue
+ gTextureList.clearFetchingRequests();
+
+ //wait for all works to be done
+ while(1)
+ {
+ S32 pending = 0;
+ pending += LLAppViewer::getTextureCache()->update(1);
+ pending += LLAppViewer::getImageDecodeThread()->update(1);
+ pending += LLAppViewer::getTextureFetch()->update(1);
+ if(!pending)
+ {
+ break;
+ }
+ }
+
+ //collect statistics
+ mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+
+ std::set<LLUUID> fetched_textures;
+ S32 size = mFetchingHistory.size();
+ for(S32 i = 0 ; i < size; i++)
+ {
+ bool in_list = true;
+ if(fetched_textures.find(mFetchingHistory[i].mID) == fetched_textures.end())
+ {
+ fetched_textures.insert(mFetchingHistory[i].mID);
+ in_list = false;
+ }
+
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(mFetchingHistory[i].mID);
+ if(tex && tex->isJustBound()) //visible
+ {
+ if(!in_list)
+ {
+ mNumVisibleFetchedTextures++;
+ }
+ mNumVisibleFetchingRequests++;
+
+ mVisibleFetchedData += mFetchingHistory[i].mFetchedSize;
+ mVisibleDecodedData += mFetchingHistory[i].mDecodedSize;
+
+ if(tex->getDiscardLevel() >= mFetchingHistory[i].mDecodedLevel)
+ {
+ mRenderedData += mFetchingHistory[i].mFetchedSize;
+ mRenderedDecodedData += mFetchingHistory[i].mDecodedSize;
+ mRenderedPixels += tex->getWidth() * tex->getHeight();
+ }
+ }
+ }
+
+ mNumFetchedTextures = fetched_textures.size();
+}
+
+void LLTextureFetchDebugger::stopDebug()
+{
+ //clear the current debug work
+ S32 size = mFetchingHistory.size();
+ switch(mState)
+ {
+ case READ_CACHE:
+ for(S32 i = 0 ; i < size; i++)
+ {
+ if (mFetchingHistory[i]. mCacheHandle != LLTextureCache::nullHandle())
+ {
+ mTextureCache->readComplete(mFetchingHistory[i].mCacheHandle, true);
+ }
+ }
+ break;
+ case WRITE_CACHE:
+ for(S32 i = 0 ; i < size; i++)
+ {
+ if (mFetchingHistory[i].mCacheHandle != LLTextureCache::nullHandle())
+ {
+ mTextureCache->writeComplete(mFetchingHistory[i].mCacheHandle, true);
+ }
+ }
+ break;
+ case DECODING:
+ break;
+ case HTTP_FETCHING:
+ break;
+ case GL_TEX:
+ break;
+ default:
+ break;
+ }
+
+ while(1)
+ {
+ if(update())
+ {
+ break;
+ }
+ }
+
+ //unlock the fetcher
+ mFetcher->lockFetcher(false);
+ mFreezeHistory = FALSE;
+ mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset
+}
+
+//called in the main thread and when the fetching queue is empty
+void LLTextureFetchDebugger::clearHistory()
+{
+ mFetchingHistory.clear();
+ init();
+}
+
+void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker)
+{
+ if(mFreezeHistory)
+ {
+ mRefetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight();
+ mRefetchedData += worker->mFormattedImage->getDataSize();
+ return;
+ }
+
+ if(worker->mInCache)
+ {
+ mNumCacheHits++;
+ }
+ mFetchedData += worker->mFormattedImage->getDataSize();
+ mDecodedData += worker->mRawImage->getDataSize();
+ mFetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight();
+
+ mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize()));
+ //mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mHaveAllData ? 0 : worker->mLoadedDiscard, worker->mFormattedImage->getComponents(),
+ //worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize()));
+}
+
+void LLTextureFetchDebugger::lockCache()
+{
+}
+
+void LLTextureFetchDebugger::unlockCache()
+{
+}
+
+void LLTextureFetchDebugger::debugCacheRead()
+{
+ lockCache();
+ llassert_always(mState == IDLE);
+ mTimer.reset();
+ mState = READ_CACHE;
+
+ S32 size = mFetchingHistory.size();
+ for(S32 i = 0 ; i < size ; i++)
+ {
+ mFetchingHistory[i].mFormattedImage = NULL;
+ mFetchingHistory[i].mCacheHandle = mTextureCache->readFromCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, 0, mFetchingHistory[i].mFetchedSize,
+ new LLDebuggerCacheReadResponder(this, i, mFetchingHistory[i].mFormattedImage));
+ }
+}
+
+void LLTextureFetchDebugger::clearCache()
+{
+ S32 size = mFetchingHistory.size();
+ {
+ std::set<LLUUID> deleted_list;
+ for(S32 i = 0 ; i < size ; i++)
+ {
+ if(deleted_list.find(mFetchingHistory[i].mID) == deleted_list.end())
+ {
+ deleted_list.insert(mFetchingHistory[i].mID);
+ mTextureCache->removeFromCache(mFetchingHistory[i].mID);
+ }
+ }
+ }
+}
+
+void LLTextureFetchDebugger::debugCacheWrite()
+{
+ //remove from cache
+ clearCache();
+
+ lockCache();
+ llassert_always(mState == IDLE);
+ mTimer.reset();
+ mState = WRITE_CACHE;
+
+ S32 size = mFetchingHistory.size();
+ for(S32 i = 0 ; i < size ; i++)
+ {
+ if(mFetchingHistory[i].mFormattedImage.notNull())
+ {
+ mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL,
+ mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize,
+ mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1,
+ new LLDebuggerCacheWriteResponder(this, i));
+ }
+ }
+}
+
+void LLTextureFetchDebugger::lockDecoder()
+{
+}
+
+void LLTextureFetchDebugger::unlockDecoder()
+{
+}
+
+void LLTextureFetchDebugger::debugDecoder()
+{
+ lockDecoder();
+ llassert_always(mState == IDLE);
+ mTimer.reset();
+ mState = DECODING;
+
+ S32 size = mFetchingHistory.size();
+ for(S32 i = 0 ; i < size ; i++)
+ {
+ if(mFetchingHistory[i].mFormattedImage.isNull())
+ {
+ continue;
+ }
+
+ mImageDecodeThread->decodeImage(mFetchingHistory[i].mFormattedImage, LLWorkerThread::PRIORITY_NORMAL,
+ mFetchingHistory[i].mDecodedLevel, mFetchingHistory[i].mNeedsAux,
+ new LLDebuggerDecodeResponder(this, i));
+ }
+}
+
+void LLTextureFetchDebugger::debugHTTP()
+{
+ llassert_always(mState == IDLE);
+
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region)
+ {
+ llinfos << "Fetch Debugger : Current region undefined. Cannot fetch textures through HTTP." << llendl;
+ return;
+ }
+
+ mHTTPUrl = region->getHttpUrl();
+ if (mHTTPUrl.empty())
+ {
+ llinfos << "Fetch Debugger : Current region URL undefined. Cannot fetch textures through HTTP." << llendl;
+ return;
+ }
+
+ mTimer.reset();
+ mState = HTTP_FETCHING;
+
+ S32 size = mFetchingHistory.size();
+ for (S32 i = 0 ; i < size ; i++)
+ {
+ mFetchingHistory[i].mCurlState = FetchEntry::CURL_NOT_DONE;
+ mFetchingHistory[i].mCurlReceivedSize = 0;
+ mFetchingHistory[i].mHTTPFailCount = 0;
+ }
+ mNbCurlRequests = 0;
+ mNbCurlCompleted = 0;
+
+ fillCurlQueue();
+}
+
+S32 LLTextureFetchDebugger::fillCurlQueue()
+{
+ if (mNbCurlRequests == 24)
+ return mNbCurlRequests;
+
+ S32 size = mFetchingHistory.size();
+ for (S32 i = 0 ; i < size ; i++)
+ {
+ if (mFetchingHistory[i].mCurlState != FetchEntry::CURL_NOT_DONE)
+ continue;
+ std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[i].mID.asString().c_str();
+ S32 requestedSize = mFetchingHistory[i].mRequestedSize;
+ // We request the whole file if the size was not set.
+ requestedSize = llmax(0,requestedSize);
+ // We request the whole file if the size was set to an absurdly high value (meaning all file)
+ requestedSize = (requestedSize == 33554432 ? 0 : requestedSize);
+ std::vector<std::string> headers;
+ headers.push_back("Accept: image/x-j2c");
+ bool res = mCurlGetRequest->getByteRange(texture_url, headers, 0, requestedSize, new LLDebuggerHTTPResponder(this, i));
+ if (res)
+ {
+ mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS;
+ mNbCurlRequests++;
+ // Hack
+ if (mNbCurlRequests == 24)
+ break;
+ }
+ else
+ {
+ break;
+ }
+ }
+ //llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl;
+ return mNbCurlRequests;
+}
+
+void LLTextureFetchDebugger::debugGLTextureCreation()
+{
+ llassert_always(mState == IDLE);
+ mState = GL_TEX;
+ std::vector<LLViewerFetchedTexture*> tex_list;
+
+ S32 size = mFetchingHistory.size();
+ for(S32 i = 0 ; i < size ; i++)
+ {
+ if(mFetchingHistory[i].mRawImage.notNull())
+ {
+ LLViewerFetchedTexture* tex = gTextureList.findImage(mFetchingHistory[i].mID) ;
+ if(tex && !tex->isForSculptOnly())
+ {
+ tex->destroyGLTexture() ;
+ tex_list.push_back(tex);
+ }
+ }
+ }
+
+ mTimer.reset();
+ S32 j = 0 ;
+ S32 size1 = tex_list.size();
+ for(S32 i = 0 ; i < size && j < size1; i++)
+ {
+ if(mFetchingHistory[i].mRawImage.notNull())
+ {
+ if(mFetchingHistory[i].mID == tex_list[j]->getID())
+ {
+ tex_list[j]->createGLTexture(mFetchingHistory[i].mDecodedLevel, mFetchingHistory[i].mRawImage, 0, TRUE, tex_list[j]->getBoostLevel());
+ j++;
+ }
+ }
+ }
+
+ mGLCreationTime = mTimer.getElapsedTimeF32() ;
+ return;
+}
+
+//clear fetching results of all textures.
+void LLTextureFetchDebugger::clearTextures()
+{
+ S32 size = mFetchingHistory.size();
+ for(S32 i = 0 ; i < size ; i++)
+ {
+ LLViewerFetchedTexture* tex = gTextureList.findImage(mFetchingHistory[i].mID) ;
+ if(tex)
+ {
+ tex->clearFetchedResults() ;
+ }
+ }
+}
+
+void LLTextureFetchDebugger::debugRefetchVisibleFromCache()
+{
+ llassert_always(mState == IDLE);
+ mState = REFETCH_VIS_CACHE;
+
+ clearTextures();
+
+ mTimer.reset();
+ mFetcher->lockFetcher(false);
+}
+
+void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP()
+{
+ llassert_always(mState == IDLE);
+ mState = REFETCH_VIS_HTTP;
+
+ clearCache();
+ clearTextures();
+
+ mTimer.reset();
+ mFetcher->lockFetcher(false);
+}
+
+bool LLTextureFetchDebugger::update()
+{
+ switch(mState)
+ {
+ case READ_CACHE:
+ if(!mTextureCache->update(1))
+ {
+ mCacheReadTime = mTimer.getElapsedTimeF32() ;
+ mState = IDLE;
+ unlockCache();
+ }
+ break;
+ case WRITE_CACHE:
+ if(!mTextureCache->update(1))
+ {
+ mCacheWriteTime = mTimer.getElapsedTimeF32() ;
+ mState = IDLE;
+ unlockCache();
+ }
+ break;
+ case DECODING:
+ if(!mImageDecodeThread->update(1))
+ {
+ mDecodingTime = mTimer.getElapsedTimeF32() ;
+ mState = IDLE;
+ unlockDecoder();
+ }
+ break;
+ case HTTP_FETCHING:
+ mCurlGetRequest->process();
+ LLCurl::getCurlThread()->update(1);
+ if (!fillCurlQueue() && mNbCurlCompleted == mFetchingHistory.size())
+ {
+ mHTTPTime = mTimer.getElapsedTimeF32() ;
+ mState = IDLE;
+ }
+ break;
+ case GL_TEX:
+ mState = IDLE;
+ break;
+ case REFETCH_VIS_CACHE:
+ if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
+ {
+ mRefetchVisCacheTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+ mState = IDLE;
+ mFetcher->lockFetcher(true);
+ }
+ break;
+ case REFETCH_VIS_HTTP:
+ if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
+ {
+ mRefetchVisHTTPTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+ mState = IDLE;
+ mFetcher->lockFetcher(true);
+ }
+ break;
+ default:
+ mState = IDLE;
+ break;
+ }
+
+ return mState == IDLE;
+}
+
+void LLTextureFetchDebugger::callbackCacheRead(S32 id, bool success, LLImageFormatted* image,
+ S32 imagesize, BOOL islocal)
+{
+ if (success)
+ {
+ mFetchingHistory[id].mFormattedImage = image;
+ }
+ mTextureCache->readComplete(mFetchingHistory[id].mCacheHandle, false);
+ mFetchingHistory[id].mCacheHandle = LLTextureCache::nullHandle();
+}
+
+void LLTextureFetchDebugger::callbackCacheWrite(S32 id, bool success)
+{
+ mTextureCache->writeComplete(mFetchingHistory[id].mCacheHandle);
+ mFetchingHistory[id].mCacheHandle = LLTextureCache::nullHandle();
+}
+
+void LLTextureFetchDebugger::callbackDecoded(S32 id, bool success, LLImageRaw* raw, LLImageRaw* aux)
+{
+ if (success)
+ {
+ llassert_always(raw);
+ mFetchingHistory[id].mRawImage = raw;
+ }
+}
+
+void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer,
+ bool partial, bool success)
+{
+ mNbCurlRequests--;
+ if (success)
+ {
+ mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE;
+ mNbCurlCompleted++;
+
+ S32 data_size = buffer->countAfter(channels.in(), NULL);
+ mFetchingHistory[id].mCurlReceivedSize += data_size;
+ //llinfos << "Fetch Debugger : got results for " << id << ", data_size = " << data_size << ", received = " << mFetchingHistory[id].mCurlReceivedSize << ", requested = " << mFetchingHistory[id].mRequestedSize << ", partial = " << partial << llendl;
+ if ((mFetchingHistory[id].mCurlReceivedSize >= mFetchingHistory[id].mRequestedSize) || !partial || (mFetchingHistory[id].mRequestedSize == 600))
+ {
+ U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size);
+ buffer->readAfter(channels.in(), NULL, d_buffer, data_size);
+
+ llassert_always(mFetchingHistory[id].mFormattedImage.isNull());
+ {
+ // For now, create formatted image based on extension
+ std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[id].mID.asString().c_str();
+ std::string extension = gDirUtilp->getExtension(texture_url);
+ mFetchingHistory[id].mFormattedImage = LLImageFormatted::createFromType(LLImageBase::getCodecFromExtension(extension));
+ if (mFetchingHistory[id].mFormattedImage.isNull())
+ {
+ mFetchingHistory[id].mFormattedImage = new LLImageJ2C; // default
+ }
+ }
+
+ mFetchingHistory[id].mFormattedImage->setData(d_buffer, data_size);
+ }
+ }
+ else //failed
+ {
+ mFetchingHistory[id].mHTTPFailCount++;
+ if(mFetchingHistory[id].mHTTPFailCount < 5)
+ {
+ // Fetch will have to be redone
+ mFetchingHistory[id].mCurlState = FetchEntry::CURL_NOT_DONE;
+ }
+ else //skip
+ {
+ mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE;
+ mNbCurlCompleted++;
+ }
+ }
+}
+
+
+//---------------------
+///////////////////////////////////////////////////////////////////////////////////////////
+//End LLTextureFetchDebugger
+///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 710dd67e99..107e1623b0 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -34,14 +34,17 @@
#include "llcurl.h"
#include "lltextureinfo.h"
#include "llapr.h"
+#include "llimageworker.h"
+//#include "lltexturecache.h"
class LLViewerTexture;
class LLTextureFetchWorker;
class HTTPGetResponder;
-class LLTextureCache;
class LLImageDecodeThread;
class LLHost;
class LLViewerAssetStats;
+class LLTextureFetchDebugger;
+class LLTextureCache;
// Interface class
class LLTextureFetch : public LLWorkerThread
@@ -212,7 +215,195 @@ public:
// attempt to log metrics follows a break in the metrics stream
// reporting due to either startup or a problem POSTing data.
static volatile bool svMetricsDataBreak;
+
+private:
+ //debug use
+ LLTextureFetchDebugger* mFetchDebugger;
+ bool mFetcherLocked;
+
+public:
+ //debug use
+ LLTextureFetchDebugger* getFetchDebugger() { return mFetchDebugger;}
+ void lockFetcher(bool lock) { mFetcherLocked = lock;}
};
+//debug use
+class LLTextureFetchDebugger
+{
+ friend class LLTextureFetch;
+public:
+ LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) ;
+ ~LLTextureFetchDebugger();
+
+public:
+ enum e_debug_state
+ {
+ IDLE = 0,
+ READ_CACHE,
+ WRITE_CACHE,
+ DECODING,
+ HTTP_FETCHING,
+ GL_TEX,
+ REFETCH_VIS_CACHE,
+ REFETCH_VIS_HTTP,
+ REFETCH_ALL_CACHE,
+ REFETCH_ALL_HTTP,
+ INVALID
+ };
+
+private:
+ struct FetchEntry
+ {
+ enum e_curl_state
+ {
+ CURL_NOT_DONE = 0,
+ CURL_IN_PROGRESS,
+ CURL_DONE
+ };
+ LLUUID mID;
+ S32 mRequestedSize;
+ S32 mDecodedLevel;
+ S32 mFetchedSize;
+ S32 mDecodedSize;
+ BOOL mNeedsAux;
+ U32 mCacheHandle;
+ LLPointer<LLImageFormatted> mFormattedImage;
+ LLPointer<LLImageRaw> mRawImage;
+ e_curl_state mCurlState;
+ S32 mCurlReceivedSize;
+ S32 mHTTPFailCount;
+
+ FetchEntry() :
+ mDecodedLevel(-1),
+ mFetchedSize(0),
+ mDecodedSize(0)
+ {}
+ FetchEntry(LLUUID& id, S32 r_size, /*S32 f_discard, S32 c,*/ S32 level, S32 f_size, S32 d_size) :
+ mID(id),
+ mRequestedSize(r_size),
+ mDecodedLevel(level),
+ mFetchedSize(f_size),
+ mDecodedSize(d_size),
+ mNeedsAux(false),
+ mHTTPFailCount(0)
+ {}
+ };
+ std::vector<FetchEntry> mFetchingHistory;
+
+ e_debug_state mState;
+
+ F32 mCacheReadTime;
+ F32 mCacheWriteTime;
+ F32 mDecodingTime;
+ F32 mHTTPTime;
+ F32 mGLCreationTime;
+
+ F32 mTotalFetchingTime;
+ F32 mRefetchVisCacheTime;
+ F32 mRefetchVisHTTPTime;
+
+ LLTimer mTimer;
+
+ LLTextureFetch* mFetcher;
+ LLTextureCache* mTextureCache;
+ LLImageDecodeThread* mImageDecodeThread;
+ LLCurlRequest* mCurlGetRequest;
+
+ S32 mNumFetchedTextures;
+ S32 mNumCacheHits;
+ S32 mNumVisibleFetchedTextures;
+ S32 mNumVisibleFetchingRequests;
+ U32 mFetchedData;
+ U32 mDecodedData;
+ U32 mVisibleFetchedData;
+ U32 mVisibleDecodedData;
+ U32 mRenderedData;
+ U32 mRenderedDecodedData;
+ U32 mFetchedPixels;
+ U32 mRenderedPixels;
+ U32 mRefetchedData;
+ U32 mRefetchedPixels;
+
+ BOOL mFreezeHistory;
+
+ std::string mHTTPUrl;
+ S32 mNbCurlRequests;
+ S32 mNbCurlCompleted;
+
+public:
+ bool update(); //called in the main thread once per frame
+
+ //fetching history
+ void clearHistory();
+ void addHistoryEntry(LLTextureFetchWorker* worker);
+
+ void setCurlGetRequest(LLCurlRequest* request) { mCurlGetRequest = request;}
+
+ void startDebug();
+ void stopDebug(); //stop everything
+ void debugCacheRead();
+ void debugCacheWrite();
+ void debugHTTP();
+ void debugDecoder();
+ void debugGLTextureCreation();
+ void debugRefetchVisibleFromCache();
+ void debugRefetchVisibleFromHTTP();
+
+ void callbackCacheRead(S32 id, bool success, LLImageFormatted* image,
+ S32 imagesize, BOOL islocal);
+ void callbackCacheWrite(S32 id, bool success);
+ void callbackDecoded(S32 id, bool success, LLImageRaw* raw, LLImageRaw* aux);
+ void callbackHTTP(S32 id, const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer,
+ bool partial, bool success);
+
+
+ e_debug_state getState() {return mState;}
+ S32 getNumFetchedTextures() {return mNumFetchedTextures;}
+ S32 getNumFetchingRequests() {return mFetchingHistory.size();}
+ S32 getNumCacheHits() {return mNumCacheHits;}
+ S32 getNumVisibleFetchedTextures() {return mNumVisibleFetchedTextures;}
+ S32 getNumVisibleFetchingRequests() {return mNumVisibleFetchingRequests;}
+ U32 getFetchedData() {return mFetchedData;}
+ U32 getDecodedData() {return mDecodedData;}
+ U32 getVisibleFetchedData() {return mVisibleFetchedData;}
+ U32 getVisibleDecodedData() {return mVisibleDecodedData;}
+ U32 getRenderedData() {return mRenderedData;}
+ U32 getRenderedDecodedData() {return mRenderedDecodedData;}
+ U32 getFetchedPixels() {return mFetchedPixels;}
+ U32 getRenderedPixels() {return mRenderedPixels;}
+ U32 getRefetchedData() {return mRefetchedData;}
+ U32 getRefetchedPixels() {return mRefetchedPixels;}
+
+ F32 getCacheReadTime() {return mCacheReadTime;}
+ F32 getCacheWriteTime() {return mCacheWriteTime;}
+ F32 getDecodeTime() {return mDecodingTime;}
+ F32 getGLCreationTime() {return mGLCreationTime;}
+ F32 getHTTPTime() {return mHTTPTime;}
+ F32 getTotalFetchingTime() {return mTotalFetchingTime;}
+ F32 getRefetchVisCacheTime() {return mRefetchVisCacheTime;}
+ F32 getRefetchVisHTTPTime() {return mRefetchVisHTTPTime;}
+
+private:
+ void init();
+ void clearTextures();//clear fetching results of all textures.
+ void clearCache();
+
+ void lockFetcher();
+ void unlockFetcher();
+
+ void lockCache();
+ void unlockCache();
+
+ void lockDecoder();
+ void unlockDecoder();
+
+ S32 fillCurlQueue();
+
+private:
+ static bool sDebuggerEnabled;
+public:
+ static bool isEnabled() {return sDebuggerEnabled;}
+};
#endif // LL_LLTEXTUREFETCH_H
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 68dd8cb23b..425bf7ee87 100755
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -384,7 +384,7 @@ public:
Params()
: texture_view("texture_view")
{
- S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
+ S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
changeDefault(rect, LLRect(0,0,100,line_height * 4));
}
};
@@ -409,7 +409,7 @@ void LLAvatarTexBar::draw()
LLVOAvatarSelf* avatarp = gAgentAvatarp;
if (!avatarp) return;
- const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
+ const S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
const S32 v_offset = 0;
const S32 l_offset = 3;
@@ -483,7 +483,7 @@ public:
Params()
: texture_view("texture_view")
{
- S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
+ S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
changeDefault(rect, LLRect(0,0,100,line_height * 4));
}
};
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index da691a2d0c..0eec7f0afd 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -180,11 +180,14 @@ LLToast::~LLToast()
//--------------------------------------------------------------------------
void LLToast::hide()
{
- setVisible(FALSE);
- setFading(false);
- mTimer->stop();
- mIsHidden = true;
- mOnFadeSignal(this);
+ if (!mIsHidden)
+ {
+ setVisible(FALSE);
+ setFading(false);
+ mTimer->stop();
+ mIsHidden = true;
+ mOnFadeSignal(this);
+ }
}
void LLToast::onFocusLost()
@@ -215,6 +218,13 @@ void LLToast::setFadingTime(S32 seconds)
mToastFadingTime = seconds;
}
+void LLToast::closeToast()
+{
+ mOnDeleteToastSignal(this);
+
+ closeFloater();
+}
+
S32 LLToast::getTopPad()
{
if(mWrapperPanel)
@@ -296,9 +306,7 @@ void LLToast::reshapeToPanel()
if(!panel)
return;
- LLRect panel_rect = panel->getRect();
-
- panel_rect.setLeftTopAndSize(0, panel_rect.getHeight(), panel_rect.getWidth(), panel_rect.getHeight());
+ LLRect panel_rect = panel->getLocalRect();
panel->setShape(panel_rect);
LLRect toast_rect = getRect();
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 0b06728935..e1d99b1bcb 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -75,6 +75,7 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
public:
typedef boost::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
+ typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
struct Params : public LLInitParam::Block<Params>
{
@@ -131,7 +132,7 @@ public:
void reshapeToPanel();
// get toast's panel
- LLPanel* getPanel() { return mPanel; }
+ LLPanel* getPanel() const { return mPanel; }
// enable/disable Toast's Hide button
void setHideButtonEnabled(bool enabled);
//
@@ -155,6 +156,8 @@ public:
void setFadingTime(S32 seconds);
+ void closeToast();
+
/**
* Returns padding between floater top and wrapper_panel top.
* This padding should be taken into account when positioning or reshaping toasts
@@ -167,9 +170,9 @@ public:
// get information whether the notification corresponding to the toast is valid or not
bool isNotificationValid();
// get toast's Notification ID
- const LLUUID getNotificationID() { return mNotificationID;}
+ const LLUUID getNotificationID() const { return mNotificationID;}
// get toast's Session ID
- const LLUUID getSessionID() { return mSessionID;}
+ const LLUUID getSessionID() const { return mSessionID;}
//
void setCanFade(bool can_fade);
//
@@ -179,19 +182,12 @@ public:
// set whether this toast considered as hidden or not
void setIsHidden( bool is_toast_hidden ) { mIsHidden = is_toast_hidden; }
- const LLNotificationPtr& getNotification() { return mNotification;}
+ const LLNotificationPtr& getNotification() const { return mNotification;}
// Registers signals/callbacks for events
- toast_signal_t mOnFadeSignal;
- toast_signal_t mOnDeleteToastSignal;
- toast_signal_t mOnToastDestroyedSignal;
- boost::signals2::connection setOnFadeCallback(toast_callback_t cb) { return mOnFadeSignal.connect(cb); }
- boost::signals2::connection setOnToastDestroyedCallback(toast_callback_t cb) { return mOnToastDestroyedSignal.connect(cb); }
-
- typedef boost::function<void (LLToast* toast, bool mouse_enter)> toast_hover_check_callback_t;
- typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
- toast_hover_check_signal_t mOnToastHoverSignal;
- boost::signals2::connection setOnToastHoverCallback(toast_hover_check_callback_t cb) { return mOnToastHoverSignal.connect(cb); }
+ boost::signals2::connection setOnFadeCallback(const toast_signal_t::slot_type& cb) { return mOnFadeSignal.connect(cb); }
+ boost::signals2::connection setOnToastDestroyedCallback(const toast_signal_t::slot_type& cb) { return mOnToastDestroyedSignal.connect(cb); }
+ boost::signals2::connection setOnToastHoverCallback(const toast_hover_check_signal_t::slot_type& cb) { return mOnToastHoverSignal.connect(cb); }
boost::signals2::connection setMouseEnterCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseEnterSignal.connect(cb); };
boost::signals2::connection setMouseLeaveCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseLeaveSignal.connect(cb); };
@@ -237,6 +233,11 @@ private:
bool mIsFading;
bool mIsHovered;
+ toast_signal_t mOnFadeSignal;
+ toast_signal_t mOnDeleteToastSignal;
+ toast_signal_t mOnToastDestroyedSignal;
+ toast_hover_check_signal_t mOnToastHoverSignal;
+
commit_signal_t mToastMouseEnterSignal;
commit_signal_t mToastMouseLeaveSignal;
};
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 0f337825e9..8fef2ed6d1 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -69,8 +69,22 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLabel(notification->getName()),
mLineEditor(NULL)
{
+ // EXP-1822
+ // save currently focused view, so that return focus to it
+ // on destroying this toast.
+ LLView* current_selection = dynamic_cast<LLView*>(gFocusMgr.getKeyboardFocus());
+ while(current_selection)
+ {
+ if (current_selection->isFocusRoot())
+ {
+ mPreviouslyFocusedView = current_selection->getHandle();
+ break;
+ }
+ current_selection = current_selection->getParent();
+ }
+
const LLFontGL* font = LLFontGL::getFontSansSerif();
- const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f);
+ const S32 LINE_HEIGHT = font->getLineHeight();
const S32 EDITOR_HEIGHT = 20;
LLNotificationFormPtr form = mNotification->getForm();
@@ -365,7 +379,7 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::
}
const LLFontGL* font = mCheck->getFont();
- const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f);
+ const S32 LINE_HEIGHT = font->getLineHeight();
// Extend dialog for "check next time"
S32 max_msg_width = LLToastPanel::getRect().getWidth() - 2 * HPAD;
@@ -408,6 +422,13 @@ LLToastAlertPanel::~LLToastAlertPanel()
{
LLTransientFloaterMgr::instance().removeControlView(
LLTransientFloaterMgr::GLOBAL, this);
+
+ // EXP-1822
+ // return focus to the previously focused view if the viewer is not exiting
+ if (mPreviouslyFocusedView.get() && !LLApp::isExiting())
+ {
+ mPreviouslyFocusedView.get()->setFocus(TRUE);
+ }
}
BOOL LLToastAlertPanel::hasTitleBar() const
diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h
index 7b157f19bb..d1be5e018e 100644
--- a/indra/newview/lltoastalertpanel.h
+++ b/indra/newview/lltoastalertpanel.h
@@ -113,6 +113,7 @@ private:
LLFrameTimer mDefaultBtnTimer;
// For Dialogs that take a line as text as input:
LLLineEditor* mLineEditor;
+ LLHandle<LLView> mPreviouslyFocusedView;
};
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
index fc69157a40..d2a4ce8745 100644
--- a/indra/newview/lltoastpanel.cpp
+++ b/indra/newview/lltoastpanel.cpp
@@ -68,7 +68,7 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount)
if (message->getVisible())
{
S32 heightDelta = 0;
- S32 maxTextHeight = (S32)(message->getDefaultFont()->getLineHeight() * maxLineCount);
+ S32 maxTextHeight = message->getDefaultFont()->getLineHeight() * maxLineCount;
LLRect messageRect = message->getRect();
S32 oldTextHeight = messageRect.getHeight();
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 8c32dfcb4d..c7ab934f9e 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -333,14 +333,15 @@ LLToolDragAndDrop::LLDragAndDropDictionary::LLDragAndDropDictionary()
};
LLToolDragAndDrop::LLToolDragAndDrop()
-: LLTool(std::string("draganddrop"), NULL),
- mDragStartX(0),
- mDragStartY(0),
- mSource(SOURCE_AGENT),
- mCursor(UI_CURSOR_NO),
- mLastAccept(ACCEPT_NO),
- mDrop(FALSE),
- mCurItemIndex(0)
+: LLTool(std::string("draganddrop"), NULL),
+ mCargoCount(0),
+ mDragStartX(0),
+ mDragStartY(0),
+ mSource(SOURCE_AGENT),
+ mCursor(UI_CURSOR_NO),
+ mLastAccept(ACCEPT_NO),
+ mDrop(FALSE),
+ mCurItemIndex(0)
{
}
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 188d36cd1b..245c2a23e6 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -86,8 +86,11 @@ public:
EAcceptance getLastAccept() { return mLastAccept; }
boost::signals2::connection setEndDragCallback( const enddrag_signal_t::slot_type& cb ) { return mEndDragSignal.connect(cb); }
-
- uuid_vec_t::size_type getCargoIDsCount() const { return mCargoIDs.size(); }
+
+ void setCargoCount(U32 count) { mCargoCount = count; }
+ void resetCargoCount() { mCargoCount = 0; }
+ U32 getCargoCount() const { return (mCargoCount > 0) ? mCargoCount : mCargoIDs.size(); }
+
static S32 getOperationId() { return sOperationId; }
protected:
@@ -118,6 +121,8 @@ protected:
protected:
+ U32 mCargoCount;
+
S32 mDragStartX;
S32 mDragStartY;
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 6bc7c6de11..ac01316462 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -81,7 +81,7 @@ LLToolMgr::LLToolMgr()
// Not a panel, register these callbacks globally.
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
- LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this));
+ LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2));
gToolNull = new LLTool(LLStringUtil::null); // Does nothing
setCurrentTool(gToolNull);
@@ -245,8 +245,15 @@ bool LLToolMgr::canEdit()
return LLViewerParcelMgr::getInstance()->allowAgentBuild();
}
-void LLToolMgr::toggleBuildMode()
+void LLToolMgr::toggleBuildMode(const LLSD& sdname)
{
+ const std::string& param = sdname.asString();
+
+ if (param == "build" && !canEdit())
+ {
+ return;
+ }
+
LLFloaterReg::toggleInstanceOrBringToFront("build");
bool build_visible = LLFloaterReg::instanceVisible("build");
diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h
index d489c4c829..12649cfba2 100644
--- a/indra/newview/lltoolmgr.h
+++ b/indra/newview/lltoolmgr.h
@@ -54,7 +54,7 @@ public:
bool inEdit();
bool canEdit();
- void toggleBuildMode();
+ void toggleBuildMode(const LLSD& sdname);
/* Determines if we are in Build mode or not. */
bool inBuildMode();
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index c1cc9c7bc4..f3d8de1904 100755
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -162,10 +162,10 @@ void LLBingTranslationHandler::getTranslateURL(
const std::string &text) const
{
url = std::string("http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=")
- + getAPIKey() + "&text=" + LLURI::escape(text) + "&to=" + to_lang;
+ + getAPIKey() + "&text=" + LLURI::escape(text) + "&to=" + getAPILanguageCode(to_lang);
if (!from_lang.empty())
{
- url += "&from=" + from_lang;
+ url += "&from=" + getAPILanguageCode(from_lang);
}
}
@@ -236,6 +236,12 @@ std::string LLBingTranslationHandler::getAPIKey()
return gSavedSettings.getString("BingTranslateAPIKey");
}
+// static
+std::string LLBingTranslationHandler::getAPILanguageCode(const std::string& lang)
+{
+ return lang == "zh" ? "zh-CHT" : lang; // treat Chinese as Traditional Chinese
+}
+
LLTranslate::TranslationReceiver::TranslationReceiver(const std::string& from_lang, const std::string& to_lang)
: mFromLang(from_lang)
, mToLang(to_lang)
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index 424bc14587..c58e1adb8c 100755
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -157,6 +157,7 @@ public:
/*virtual*/ bool isConfigured() const;
private:
static std::string getAPIKey();
+ static std::string getAPILanguageCode(const std::string& lang);
};
/**
diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp
index df7c5be0d6..e59064c074 100644
--- a/indra/newview/lluploaddialog.cpp
+++ b/indra/newview/lluploaddialog.cpp
@@ -115,7 +115,7 @@ void LLUploadDialog::setMessage( const std::string& msg)
token = strtok( NULL, "\n" );
}
- S32 line_height = S32( font->getLineHeight() + 0.99f );
+ S32 line_height = font->getLineHeight();
S32 dialog_width = max_msg_width + 2 * HPAD;
S32 dialog_height = line_height * msg_lines.size() + 2 * VPAD;
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index cc3395115b..184033de42 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -32,8 +32,8 @@
#include "llstat.h"
#include "lltimer.h"
#include "m4math.h"
+#include "llcoord.h"
-class LLCoordGL;
class LLViewerObject;
// This rotation matrix moves the default OpenGL reference frame
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index cb40af7061..0adb187dd2 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -260,6 +260,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gPipeline.disableLights();
+ //reset vertex buffers if needed
+ gPipeline.doResetVertexBuffers();
+
stop_glerror();
// Don't draw if the window is hidden or minimized.
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index bb870f7651..d0e0d0d826 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -35,7 +35,6 @@
#include "llcallfloater.h"
#include "llfasttimerview.h"
#include "llfloaterabout.h"
-#include "llfloateranimpreview.h"
#include "llfloaterauction.h"
#include "llfloateravatar.h"
#include "llfloateravatarpicker.h"
@@ -49,6 +48,7 @@
#include "llfloaterbuyland.h"
#include "llfloaterbulkpermission.h"
#include "llfloaterbump.h"
+#include "llfloaterbvhpreview.h"
#include "llfloatercamera.h"
#include "llfloaterdeleteenvpreset.h"
#include "llfloaterdisplayname.h"
@@ -103,6 +103,7 @@
#include "llfloatertelehub.h"
#include "llfloatertestinspectors.h"
#include "llfloatertestlistview.h"
+#include "llfloatertexturefetchdebugger.h"
#include "llfloatertools.h"
#include "llfloatertos.h"
#include "llfloatertopobjects.h"
@@ -227,6 +228,11 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLandHoldings>);
LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>);
+
+ if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"))
+ {
+ LLFloaterReg::add("tex_fetch_debugger", "floater_texture_fetch_debugger.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTextureFetchDebugger>);
+ }
LLFloaterReg::add("media_settings", "floater_media_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaSettings>);
LLFloaterReg::add("message_critical", "floater_critical.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTOS>);
LLFloaterReg::add("message_tos", "floater_tos.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTOS>);
@@ -294,7 +300,8 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterUIPreviewUtil::registerFloater();
- LLFloaterReg::add("upload_anim", "floater_animation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload");
+ LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBvhPreview>, "upload");
+ LLFloaterReg::add("upload_anim_anim", "floater_animation_anim_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload");
LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterImagePreview>, "upload");
LLFloaterReg::add("upload_model", "floater_model_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterModelPreview>, "upload");
LLFloaterReg::add("upload_model_wizard", "floater_model_wizard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterModelWizard>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 163581ea7f..b47a41c44c 100644..100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -342,8 +342,8 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& ne
void LLViewerInventoryItem::removeFromServer()
{
- llinfos << "Removing inventory item " << mUUID << " from server."
- << llendl;
+ lldebugs << "Removing inventory item " << mUUID << " from server."
+ << llendl;
LLInventoryModel::LLCategoryUpdate up(mParentUUID, -1);
gInventory.accountForUpdate(up);
@@ -436,11 +436,6 @@ void LLViewerInventoryItem::fetchFromServer(void) const
gAgent.sendReliableMessage();
}
}
- else
- {
- // *FIX: this can be removed after a bit.
- llwarns << "request to fetch complete item" << llendl;
- }
}
// virtual
@@ -1462,6 +1457,7 @@ const std::string& LLViewerInventoryItem::getName() const
class LLFavoritesOrderStorage : public LLSingleton<LLFavoritesOrderStorage>
, public LLDestroyClass<LLFavoritesOrderStorage>
{
+ LOG_CLASS(LLFavoritesOrderStorage);
public:
/**
* Sets sort index for specified with LLUUID favorite landmark
@@ -1620,10 +1616,18 @@ void LLFavoritesOrderStorage::load()
void LLFavoritesOrderStorage::saveFavoritesSLURLs()
{
// Do not change the file if we are not logged in yet.
- if (!LLLoginInstance::getInstance()->authSuccess()) return;
+ if (!LLLoginInstance::getInstance()->authSuccess())
+ {
+ llwarns << "Cannot save favorites: not logged in" << llendl;
+ return;
+ }
std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "");
- if (user_dir.empty()) return;
+ if (user_dir.empty())
+ {
+ llwarns << "Cannot save favorites: empty user dir name" << llendl;
+ return;
+ }
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
llifstream in_file;
@@ -1649,13 +1653,19 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]);
if (slurl_iter != mSLURLs.end())
{
+ lldebugs << "Saving favorite: idx=" << (*it)->getSortField() << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl;
value["slurl"] = slurl_iter->second;
user_llsd[(*it)->getSortField()] = value;
}
+ else
+ {
+ llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl;
+ }
}
LLAvatarName av_name;
LLAvatarNameCache::get( gAgentID, &av_name );
+ lldebugs << "Saved favorites for " << av_name.getLegacyName() << llendl;
fav_llsd[av_name.getLegacyName()] = user_llsd;
llofstream file;
@@ -1674,6 +1684,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser()
LLAvatarName av_name;
LLAvatarNameCache::get( gAgentID, &av_name );
+ lldebugs << "Removed favorites for " << av_name.getLegacyName() << llendl;
if (fav_llsd.has(av_name.getLegacyName()))
{
fav_llsd.erase(av_name.getLegacyName());
@@ -1706,6 +1717,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar
void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl)
{
+ lldebugs << "Saving landmark SLURL: " << slurl << llendl;
mSLURLs[asset_id] = slurl;
}
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 20573c8fba..f029ae5302 100755
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -63,7 +63,6 @@ extern PFNGLWEIGHTFVARBPROC glWeightfvARB;
extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB;
#endif
-static LLPointer<LLVertexBuffer> sRenderBuffer = NULL;
static const U32 sRenderMask = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_NORMAL |
LLVertexBuffer::MAP_TEXCOORD0;
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 046360e9e9..1eb4bedfaf 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -387,7 +387,6 @@ class LLViewerMediaMuteListObserver : public LLMuteListObserver
static LLViewerMediaMuteListObserver sViewerMediaMuteListObserver;
static bool sViewerMediaMuteListObserverInitialized = false;
-static bool sInWorldMediaDisabled = false;
//////////////////////////////////////////////////////////////////////////////////////////
@@ -654,20 +653,6 @@ void LLViewerMedia::muteListChanged()
//////////////////////////////////////////////////////////////////////////////////////////
// static
-void LLViewerMedia::setInWorldMediaDisabled(bool disabled)
-{
- sInWorldMediaDisabled = disabled;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-// static
-bool LLViewerMedia::getInWorldMediaDisabled()
-{
- return sInWorldMediaDisabled;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-// static
bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest)
{
bool result = false;
@@ -1568,7 +1553,6 @@ LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource()
bool LLViewerMedia::hasInWorldMedia()
{
- if (sInWorldMediaDisabled) return false;
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
// This should be quick, because there should be very few non-in-world-media impls
@@ -1901,7 +1885,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
}
}
- LL_WARNS_ONCE("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL;
+ LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL;
LLSD args;
args["MIME_TYPE"] = media_type;
LLNotificationsUtil::add("NoPlugin", args);
@@ -3107,15 +3091,6 @@ bool LLViewerMediaImpl::isForcedUnloaded() const
return true;
}
- if(sInWorldMediaDisabled)
- {
- // When inworld media is disabled, all instances that aren't marked as "used in UI" will not be loaded.
- if(!mUsedInUI)
- {
- return true;
- }
- }
-
// If this media's class is not supposed to be shown, unload
if (!shouldShowBasedOnClass())
{
@@ -3783,12 +3758,22 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const
// If it is attached to an avatar and the pref is off, we shouldn't show it
if (attached_to_another_avatar)
- return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING);
-
+ {
+ static LLCachedControl<bool> show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING);
+ return show_media_on_others;
+ }
if (inside_parcel)
- return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING);
+ {
+ static LLCachedControl<bool> show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING);
+
+ return show_media_within_parcel;
+ }
else
- return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING);
+ {
+ static LLCachedControl<bool> show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING);
+
+ return show_media_outside_parcel;
+ }
}
//////////////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 15dcda59cf..fff5b3fc08 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -112,9 +112,6 @@ public:
static F32 getVolume();
static void muteListChanged();
- static void setInWorldMediaDisabled(bool disabled);
- static bool getInWorldMediaDisabled();
-
static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest);
// Returns the priority-sorted list of all media impls.
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 7bdfd6df1d..87fb4dc7ec 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2286,6 +2286,14 @@ class LLDevelopSetLoggingLevel : public view_listener_t
}
};
+class LLDevelopTextureFetchDebugger : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ return gSavedSettings.getBOOL("TextureFetchDebuggerEnabled");
+ }
+};
+
//////////////////
// ADMIN MENU //
//////////////////
@@ -7336,12 +7344,6 @@ class LLToolsUseSelectionForGrid : public view_listener_t
} func;
LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func);
LLSelectMgr::getInstance()->setGridMode(GRID_MODE_REF_OBJECT);
-
- LLFloaterBuildOptions* build_options_floater = LLFloaterReg::getTypedInstance<LLFloaterBuildOptions>("build_options");
- if (build_options_floater && build_options_floater->getVisible())
- {
- build_options_floater->setGridMode(GRID_MODE_REF_OBJECT);
- }
return true;
}
};
@@ -8308,6 +8310,9 @@ void initialize_menus()
// Develop >Set logging level
view_listener_t::addMenu(new LLDevelopCheckLoggingLevel(), "Develop.CheckLoggingLevel");
view_listener_t::addMenu(new LLDevelopSetLoggingLevel(), "Develop.SetLoggingLevel");
+
+ //Develop (Texture Fetch Debug Console)
+ view_listener_t::addMenu(new LLDevelopTextureFetchDebugger(), "Develop.SetTexFetchDebugger");
// Admin >Object
view_listener_t::addMenu(new LLAdminForceTakeCopy(), "Admin.ForceTakeCopy");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 7e830e14bf..dc55247df2 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -183,7 +183,7 @@ void LLFilePickerThread::clearDead()
#if LL_WINDOWS
static std::string SOUND_EXTENSIONS = "wav";
static std::string IMAGE_EXTENSIONS = "tga bmp jpg jpeg png";
-static std::string ANIM_EXTENSIONS = "bvh";
+static std::string ANIM_EXTENSIONS = "bvh anim";
#ifdef _CORY_TESTING
static std::string GEOMETRY_EXTENSIONS = "slg";
#endif
@@ -385,7 +385,14 @@ class LLFileUploadAnim : public view_listener_t
const std::string filename = upload_pick((void*)LLFilePicker::FFLOAD_ANIM);
if (!filename.empty())
{
- LLFloaterReg::showInstance("upload_anim", LLSD(filename));
+ if (filename.rfind(".anim") != std::string::npos)
+ {
+ LLFloaterReg::showInstance("upload_anim_anim", LLSD(filename));
+ }
+ else
+ {
+ LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename));
+ }
}
return true;
}
@@ -527,8 +534,22 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
FALSE))
{
gViewerWindow->playSnapshotAnimAndSound();
-
- LLPointer<LLImageFormatted> formatted = new LLImagePNG;
+ LLPointer<LLImageFormatted> formatted;
+ LLFloaterSnapshot::ESnapshotFormat fmt = (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat");
+ switch (fmt)
+ {
+ case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
+ formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
+ break;
+ default:
+ llwarns << "Unknown local snapshot format: " << fmt << llendl;
+ case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
+ formatted = new LLImagePNG;
+ break;
+ case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP:
+ formatted = new LLImageBMP;
+ break;
+ }
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize() ;
@@ -785,6 +806,11 @@ LLUUID upload_new_resource(
upload_error(error_message, "DoNotSupportBulkAnimationUpload", filename, args);
return LLUUID();
}
+ else if (exten == "anim")
+ {
+ asset_type = LLAssetType::AT_ANIMATION;
+ filename = src_filename;
+ }
else
{
// Unknown extension
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3c6770df43..2917fee62e 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -135,6 +135,7 @@ extern BOOL gDebugClicks;
// function prototypes
bool check_offer_throttle(const std::string& from_name, bool check_only);
+bool check_asset_previewable(const LLAssetType::EType asset_type);
static void process_money_balance_reply_extended(LLMessageSystem* msg);
//inventory offer throttle globals
@@ -1147,7 +1148,18 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
}
}
}
-
+
+// Return "true" if we have a preview method for that asset type, "false" otherwise
+bool check_asset_previewable(const LLAssetType::EType asset_type)
+{
+ return (asset_type == LLAssetType::AT_NOTECARD) ||
+ (asset_type == LLAssetType::AT_LANDMARK) ||
+ (asset_type == LLAssetType::AT_TEXTURE) ||
+ (asset_type == LLAssetType::AT_ANIMATION) ||
+ (asset_type == LLAssetType::AT_SCRIPT) ||
+ (asset_type == LLAssetType::AT_SOUND);
+}
+
void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name)
{
for (uuid_vec_t::const_iterator obj_iter = objects.begin();
@@ -1171,7 +1183,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
// Either an inventory item or a category.
const LLInventoryItem* item = dynamic_cast<const LLInventoryItem*>(obj);
- if (item)
+ if (item && check_asset_previewable(asset_type))
{
////////////////////////////////////////////////////////////////////////////////
// Special handling for various types.
@@ -1246,6 +1258,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
LLFloaterReg::showInstance("preview_sound", LLSD(obj_id), take_focus);
break;
default:
+ LL_DEBUGS("Messaging") << "No preview method for previewable asset type : " << LLAssetType::lookupHumanReadable(asset_type) << LL_ENDL;
break;
}
}
@@ -2360,8 +2373,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
bool mute_im = is_muted;
- if(accept_im_from_only_friend&&!is_friend)
+ if (accept_im_from_only_friend && !is_friend)
{
+ if (!gIMMgr->isNonFriendSessionNotified(session_id))
+ {
+ std::string message = LLTrans::getString("IM_unblock_only_groups_friends");
+ gIMMgr->addMessage(session_id, from_id, name, message);
+ gIMMgr->addNotifiedNonFriendSessionID(session_id);
+ }
+
mute_im = true;
}
if (!mute_im || is_linden)
@@ -5816,6 +5836,16 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
S32 orig = notification["payload"]["questions"].asInteger();
S32 new_questions = orig;
+ if (response["Details"])
+ {
+ // respawn notification...
+ LLNotificationsUtil::add(notification["name"], notification["substitutions"], notification["payload"]);
+
+ // ...with description on top
+ LLNotificationsUtil::add("DebitPermissionDetails");
+ return false;
+ }
+
// check whether permissions were granted or denied
BOOL allowed = TRUE;
// the "yes/accept" button is the first button in the template, making it button 0
@@ -5873,14 +5903,6 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id));
}
- if (response["Details"])
- {
- // respawn notification...
- LLNotificationsUtil::add(notification["name"], notification["substitutions"], notification["payload"]);
-
- // ...with description on top
- LLNotificationsUtil::add("DebitPermissionDetails");
- }
return false;
}
static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb);
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index d8acd99953..46bfb2dad0 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -35,6 +35,7 @@
#include "message.h"
#include "stdenums.h"
#include "llnotifications.h"
+#include "llextendedstatus.h"
//
// Forward declarations
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 37fb77a10a..e590f29a9a 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -143,7 +143,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
}
else
{
- gAgentAvatarp->updateRegion(regionp);
+ if (isAgentAvatarValid())
+ {
+ gAgentAvatarp->updateRegion(regionp);
+ }
}
res = gAgentAvatarp;
}
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 5de363e03c..6db2138688 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -730,7 +730,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
vector< pair<string, S32> > shaders;
shaders.push_back( make_pair( "windlight/atmosphericsVarsV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
- shaders.push_back( make_pair( "windlight/atmosphericsVarsWaterV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
+ shaders.push_back( make_pair( "windlight/atmosphericsVarsWaterV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
shaders.push_back( make_pair( "windlight/atmosphericsHelpersV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
shaders.push_back( make_pair( "lighting/lightFuncV.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
shaders.push_back( make_pair( "lighting/sumLightsV.glsl", sum_lights_class ) );
@@ -1102,19 +1102,25 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredSkinnedAlphaProgram.mName = "Deferred Skinned Alpha Shader";
+ gDeferredSkinnedAlphaProgram.mFeatures.atmosphericHelpers = true;
gDeferredSkinnedAlphaProgram.mFeatures.hasObjectSkinning = true;
gDeferredSkinnedAlphaProgram.mFeatures.calculatesAtmospherics = true;
gDeferredSkinnedAlphaProgram.mFeatures.hasGamma = true;
gDeferredSkinnedAlphaProgram.mFeatures.hasAtmospherics = true;
- gDeferredSkinnedAlphaProgram.mFeatures.calculatesLighting = true;
- gDeferredSkinnedAlphaProgram.mFeatures.hasLighting = true;
+ gDeferredSkinnedAlphaProgram.mFeatures.calculatesLighting = false;
+ gDeferredSkinnedAlphaProgram.mFeatures.hasLighting = false;
gDeferredSkinnedAlphaProgram.mFeatures.isAlphaLighting = true;
gDeferredSkinnedAlphaProgram.mFeatures.disableTextureIndex = true;
gDeferredSkinnedAlphaProgram.mShaderFiles.clear();
gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSkinnedAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+
success = gDeferredSkinnedAlphaProgram.createShader(NULL, NULL);
+
+ // Hack to include uniforms for lighting without linking in lighting file
+ gDeferredSkinnedAlphaProgram.mFeatures.calculatesLighting = true;
+ gDeferredSkinnedAlphaProgram.mFeatures.hasLighting = true;
}
if (success)
@@ -1231,11 +1237,12 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredAlphaProgram.mName = "Deferred Alpha Shader";
- gDeferredAlphaProgram.mFeatures.calculatesLighting = true;
+ gDeferredAlphaProgram.mFeatures.atmosphericHelpers = true;
+ gDeferredAlphaProgram.mFeatures.calculatesLighting = false;
gDeferredAlphaProgram.mFeatures.calculatesAtmospherics = true;
gDeferredAlphaProgram.mFeatures.hasGamma = true;
gDeferredAlphaProgram.mFeatures.hasAtmospherics = true;
- gDeferredAlphaProgram.mFeatures.hasLighting = true;
+ gDeferredAlphaProgram.mFeatures.hasLighting = false;
gDeferredAlphaProgram.mFeatures.isAlphaLighting = true;
gDeferredAlphaProgram.mFeatures.disableTextureIndex = true; //hack to disable auto-setup of texture channels
if (mVertexShaderLevel[SHADER_DEFERRED] < 1)
@@ -1251,7 +1258,12 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+
success = gDeferredAlphaProgram.createShader(NULL, NULL);
+
+ // Hack
+ gDeferredAlphaProgram.mFeatures.calculatesLighting = true;
+ gDeferredAlphaProgram.mFeatures.hasLighting = true;
}
if (success)
@@ -1394,19 +1406,24 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredAvatarAlphaProgram.mName = "Avatar Alpha Shader";
+ gDeferredAvatarAlphaProgram.mFeatures.atmosphericHelpers = true;
gDeferredAvatarAlphaProgram.mFeatures.hasSkinning = true;
- gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = true;
+ gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = false;
gDeferredAvatarAlphaProgram.mFeatures.calculatesAtmospherics = true;
gDeferredAvatarAlphaProgram.mFeatures.hasGamma = true;
gDeferredAvatarAlphaProgram.mFeatures.hasAtmospherics = true;
- gDeferredAvatarAlphaProgram.mFeatures.hasLighting = true;
+ gDeferredAvatarAlphaProgram.mFeatures.hasLighting = false;
gDeferredAvatarAlphaProgram.mFeatures.isAlphaLighting = true;
gDeferredAvatarAlphaProgram.mFeatures.disableTextureIndex = true;
gDeferredAvatarAlphaProgram.mShaderFiles.clear();
gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedNoColorF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+
success = gDeferredAvatarAlphaProgram.createShader(NULL, &mAvatarUniforms);
+
+ gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = true;
+ gDeferredAvatarAlphaProgram.mFeatures.hasLighting = true;
}
if (success)
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index b41ed00f17..99102309a1 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -187,7 +187,7 @@ public:
else
{
width = EMBEDDED_ITEM_LABEL_PADDING + mImage->getWidth() + mStyle->getFont()->getWidth(mLabel.c_str());
- height = llmax(mImage->getHeight(), llceil(mStyle->getFont()->getLineHeight()));
+ height = llmax(mImage->getHeight(), mStyle->getFont()->getLineHeight());
}
return false;
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index d5b53f3cb1..ea329f6aac 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -98,6 +98,8 @@ S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA ;
BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE ;
F32 LLViewerTexture::sCurrentTime = 0.0f ;
BOOL LLViewerTexture::sUseTextureAtlas = FALSE ;
+F32 LLViewerTexture::sTexelPixelRatio = 1.0f;
+
LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF;
const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve image quality by
@@ -178,7 +180,12 @@ LLViewerTexture* LLViewerTextureManager::findTexture(const LLUUID& id)
}
return tex ;
}
-
+
+LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID& id)
+{
+ return gTextureList.findImage(id);
+}
+
LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &media_id)
{
return LLViewerMediaTexture::findMediaTexture(media_id) ;
@@ -385,6 +392,7 @@ void LLViewerTextureManager::cleanup()
LLImageGL::sDefaultGLTexture = NULL ;
LLViewerTexture::sNullImagep = NULL;
LLViewerTexture::sBlackImagep = NULL;
+ LLViewerTexture::sCheckerBoardImagep = NULL;
LLViewerFetchedTexture::sDefaultImagep = NULL;
LLViewerFetchedTexture::sSmokeImagep = NULL;
LLViewerFetchedTexture::sMissingAssetImagep = NULL;
@@ -401,6 +409,7 @@ void LLViewerTextureManager::cleanup()
void LLViewerTexture::initClass()
{
LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ;
+ sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio");
}
// static
@@ -722,6 +731,7 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co
mNeedsGLTexture = TRUE ;
}
+ virtual_size *= sTexelPixelRatio;
if(!mMaxVirtualSizeResetCounter)
{
//flag to reset the values because the old values are used.
@@ -1297,6 +1307,7 @@ void LLViewerFetchedTexture::cleanup()
mCachedRawDiscardLevel = -1 ;
mCachedRawImageReady = FALSE ;
mSavedRawImage = NULL ;
+ mSavedRawDiscardLevel = -1;
}
void LLViewerFetchedTexture::setForSculpt()
@@ -2139,16 +2150,29 @@ bool LLViewerFetchedTexture::updateFetch()
return mIsFetching ? true : false;
}
-void LLViewerFetchedTexture::forceToDeleteRequest()
-{
- if (mHasFetcher)
- {
- LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
- mHasFetcher = FALSE;
- mIsFetching = FALSE ;
- resetTextureStats();
- }
-}
+void LLViewerFetchedTexture::clearFetchedResults()
+{
+ llassert_always(!mNeedsCreateTexture && !mIsFetching);
+
+ cleanup();
+ destroyGLTexture();
+
+ if(getDiscardLevel() >= 0) //sculpty texture, force to invalidate
+ {
+ mGLTexturep->forceToInvalidateGLTexture();
+ }
+}
+
+void LLViewerFetchedTexture::forceToDeleteRequest()
+{
+ if (mHasFetcher)
+ {
+ LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
+ mHasFetcher = FALSE;
+ mIsFetching = FALSE ;
+ resetTextureStats();
+ }
+}
void LLViewerFetchedTexture::setIsMissingAsset()
{
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 6ddff3e485..41bf625225 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -310,6 +310,7 @@ protected:
} LLGLTextureState;
LLGLTextureState mTextureState ;
+ static F32 sTexelPixelRatio;
public:
static const U32 sCurrentFileVersion;
static S32 sImageCount;
@@ -433,6 +434,8 @@ public:
bool updateFetch();
+ void clearFetchedResults(); //clear all fetched results, for debug use.
+
// Override the computation of discard levels if we know the exact output
// size of the image. Used for UI textures to not decode, even if we have
// more data.
@@ -701,6 +704,7 @@ public:
//"find-texture" just check if the texture exists, if yes, return it, otherwise return null.
//
static LLViewerTexture* findTexture(const LLUUID& id) ;
+ static LLViewerFetchedTexture* findFetchedTexture(const LLUUID& id) ;
static LLViewerMediaTexture* findMediaTexture(const LLUUID& id) ;
static LLViewerMediaTexture* createMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ;
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 64e2c1f791..7038ea24ce 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -109,6 +109,8 @@ public:
void doPreloadImages();
void doPrefetchImages();
+ void clearFetchingRequests();
+
static S32 getMinVideoRamSetting();
static S32 getMaxVideoRamSetting(bool get_recommended = false);
@@ -163,9 +165,7 @@ private:
// Request image from a specific host, used for baked avatar textures.
// Implemented in header in case someone changes default params above. JC
LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, LLHost host)
- { return getImage(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); }
-
- void clearFetchingRequests();
+ { return getImage(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); }
public:
typedef std::set<LLPointer<LLViewerFetchedTexture> > image_list_t;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e0653fec30..589714c25c 100644..100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -27,9 +27,6 @@
#include "llviewerprecompiledheaders.h"
#include "llviewerwindow.h"
-#if LL_WINDOWS
-#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
-#endif
// system library includes
#include <stdio.h>
@@ -49,7 +46,6 @@
#include "llviewquery.h"
#include "llxmltree.h"
#include "llslurl.h"
-//#include "llviewercamera.h"
#include "llrender.h"
#include "llvoiceclient.h" // for push-to-talk button handling
@@ -614,7 +610,7 @@ public:
addText(xpos, ypos, llformat("%d/%d Mesh HTTP Requests/Retries", LLMeshRepository::sHTTPRequestCount,
LLMeshRepository::sHTTPRetryCount));
ypos += y_inc;
-
+
addText(xpos, ypos, llformat("%d/%d Mesh LOD Pending/Processing", LLMeshRepository::sLODPending, LLMeshRepository::sLODProcessing));
ypos += y_inc;
@@ -1540,14 +1536,14 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mResDirty(false),
mStatesDirty(false),
mCurrResolutionIndex(0),
+ mProgressView(NULL)
+{
// gKeyboard is still NULL, so it doesn't do LLWindowListener any good to
// pass its value right now. Instead, pass it a nullary function that
// will, when we later need it, return the value of gKeyboard.
// boost::lambda::var() constructs such a functor on the fly.
- mWindowListener(new LLWindowListener(this, boost::lambda::var(gKeyboard))),
- mViewerWindowListener(new LLViewerWindowListener(this)),
- mProgressView(NULL)
-{
+ mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard)));
+ mViewerWindowListener.reset(new LLViewerWindowListener(this));
LLNotificationChannel::buildChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert"));
LLNotificationChannel::buildChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal"));
@@ -1973,12 +1969,12 @@ void LLViewerWindow::shutdownViews()
gMorphView->setVisible(FALSE);
}
llinfos << "Global views cleaned." << llendl ;
-
+
// DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open
// will crump with LL_ERRS.
LLModalDialog::shutdownModals();
llinfos << "LLModalDialog shut down." << llendl;
-
+
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
if (LLNavigationBar::instanceExists())
@@ -1986,17 +1982,17 @@ void LLViewerWindow::shutdownViews()
delete LLNavigationBar::getInstance();
}
llinfos << "LLNavigationBar destroyed." << llendl ;
-
+
// destroy menus after instantiating navbar above, as it needs
// access to gMenuHolder
cleanup_menus();
llinfos << "menus destroyed." << llendl ;
-
+
// Delete all child views.
delete mRootView;
mRootView = NULL;
llinfos << "RootView deleted." << llendl ;
-
+
// Automatically deleted as children of mRootView. Fix the globals.
gStatusBar = NULL;
gIMMgr = NULL;
@@ -2375,7 +2371,7 @@ void LLViewerWindow::draw()
gGL.matrixMode(LLRender::MM_MODELVIEW);
LLUI::pushMatrix();
- LLUI::translate( (F32) screen_x, (F32) screen_y, 0.f);
+ LLUI::translate( (F32) screen_x, (F32) screen_y);
top_ctrl->draw();
LLUI::popMatrix();
}
@@ -3183,12 +3179,6 @@ void LLViewerWindow::updateLayout()
//gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible());
}
- LLFloaterBuildOptions* build_options_floater = LLFloaterReg::findTypedInstance<LLFloaterBuildOptions>("build_options");
- if (build_options_floater && build_options_floater->getVisible())
- {
- build_options_floater->updateGridMode();
- }
-
// Always update console
if(gConsole)
{
@@ -4106,14 +4096,11 @@ void LLViewerWindow::resetSnapshotLoc()
void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
{
LLCoordWindow size;
+ LLCoordWindow new_size(new_width, new_height);
gViewerWindow->getWindow()->getSize(&size);
- if ( size.mX != new_width
- || size.mY != new_height)
+ if ( size != new_size )
{
- LLCoordWindow new_size(new_width, new_height);
- LLCoordScreen screen_size;
- gViewerWindow->getWindow()->convertCoords(new_size, &screen_size);
- gViewerWindow->getWindow()->setSize(screen_size);
+ gViewerWindow->getWindow()->setSize(new_size.convert());
}
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 275c326ef6..ffe5837249 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -786,13 +786,13 @@ std::string LLVOAvatar::avString() const
void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string comment)
{
- LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
- << "sec ]"
- << avString()
- << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
- << " Notification " << notification_name
- << " : " << comment
- << llendl;
+ LL_INFOS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
+ << "sec ]"
+ << avString()
+ << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
+ << " Notification " << notification_name
+ << " : " << comment
+ << llendl;
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
{
@@ -2859,13 +2859,13 @@ void LLVOAvatar::idleUpdateLoadingEffect()
{
if (isFullyLoaded() && mFirstFullyVisible && isSelf())
{
- LL_DEBUGS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
mFirstFullyVisible = FALSE;
LLAppearanceMgr::instance().onFirstFullyVisible();
}
if (isFullyLoaded() && mFirstFullyVisible && !isSelf())
{
- LL_DEBUGS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
mFirstFullyVisible = FALSE;
}
if (isFullyLoaded())
@@ -6494,7 +6494,7 @@ void LLVOAvatar::updateRezzedStatusTimers()
S32 rez_status = getRezzedStatus();
if (rez_status != mLastRezzedStatus)
{
- llinfos << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << llendl;
+ LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL;
bool is_cloud_or_gray = (rez_status==0 || rez_status==1);
bool was_cloud_or_gray = (mLastRezzedStatus==0 || mLastRezzedStatus==1);
bool is_cloud = (rez_status==0);
@@ -7180,7 +7180,7 @@ void LLVOAvatar::rebuildHUD()
//-----------------------------------------------------------------------------
void LLVOAvatar::onFirstTEMessageReceived()
{
- LL_DEBUGS("Avatar") << avString() << LL_ENDL;
+ LL_INFOS("Avatar") << avString() << LL_ENDL;
if( !mFirstTEMessageReceived )
{
mFirstTEMessageReceived = TRUE;
@@ -7271,7 +7271,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
mFirstAppearanceMessageReceived = TRUE;
- LL_DEBUGS("Avatar") << avString() << "processAvatarAppearance start " << mID
+ LL_INFOS("Avatar") << avString() << "processAvatarAppearance start " << mID
<< " first? " << is_first_appearance_message << " self? " << isSelf() << LL_ENDL;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 14d5b1c8d9..d2609e5587 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -403,9 +403,9 @@ BOOL LLVOAvatarSelf::buildMenus()
item_params.label = sub_piemenu_name;
}
item_params.name =(item_params.label );
- item_params.on_click.function_name = "Attachment.Detach";
+ item_params.on_click.function_name = "Attachment.DetachFromPoint";
item_params.on_click.parameter = iter->first;
- item_params.on_enable.function_name = "Attachment.EnableDetach";
+ item_params.on_enable.function_name = "Attachment.PointFilled";
item_params.on_enable.parameter = iter->first;
LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
@@ -2167,12 +2167,12 @@ public:
{
if (isGoodStatus(status))
{
- llinfos << "OK" << llendl;
+ LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
result(content);
}
else
{
- llwarns << "Failed " << status << " reason " << reason << llendl;
+ LL_WARNS("Avatar") << "Failed " << status << " reason " << reason << LL_ENDL;
error(status,reason);
}
}
@@ -2462,7 +2462,9 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
// Don't print out non-existent textures.
if (j != 0)
- LL_DEBUGS("Avatar") << out.str() << llendl;
+ {
+ LL_DEBUGS("Avatar") << out.str() << LL_ENDL;
+ }
}
LL_DEBUGS("Avatar") << "\t Time points for each upload (start / finish)" << llendl;
for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i)
@@ -2485,7 +2487,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
void LLVOAvatarSelf::outputRezTiming(const std::string& msg) const
{
- LL_DEBUGS("Avatar")
+ LL_INFOS("Avatar")
<< avString()
<< llformat("%s. Time from avatar creation: %.2f", msg.c_str(), mDebugSelfLoadTimer.getElapsedTimeF32())
<< LL_ENDL;
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index e9db37821b..312034022e 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -342,7 +342,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
blue_density = LLColor3();
blue_horizon = LLColor3();
haze_density = 0.f;
- haze_horizon = LLColor3();
+ haze_horizon = 1.f;
density_multiplier = 0.f;
max_y = 0.f;
glow = LLColor3();
@@ -651,17 +651,17 @@ void LLVOSky::initAtmospherics(void)
sunlight_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("sunlight_color", error));
ambient = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("ambient", error));
//lightnorm = LLWLParamManager::getInstance()->mCurParams.getVector("lightnorm", error);
- gamma = LLWLParamManager::getInstance()->mCurParams.getVector("gamma", error)[0];
+ gamma = LLWLParamManager::getInstance()->mCurParams.getFloat("gamma", error);
blue_density = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_density", error));
blue_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_horizon", error));
- haze_density = LLWLParamManager::getInstance()->mCurParams.getVector("haze_density", error)[0];
- haze_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("haze_horizon", error));
- density_multiplier = LLWLParamManager::getInstance()->mCurParams.getVector("density_multiplier", error)[0];
- max_y = LLWLParamManager::getInstance()->mCurParams.getVector("max_y", error)[0];
+ haze_density = LLWLParamManager::getInstance()->mCurParams.getFloat("haze_density", error);
+ haze_horizon = LLWLParamManager::getInstance()->mCurParams.getFloat("haze_horizon", error);
+ density_multiplier = LLWLParamManager::getInstance()->mCurParams.getFloat("density_multiplier", error);
+ max_y = LLWLParamManager::getInstance()->mCurParams.getFloat("max_y", error);
glow = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("glow", error));
- cloud_shadow = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_shadow", error)[0];
+ cloud_shadow = LLWLParamManager::getInstance()->mCurParams.getFloat("cloud_shadow", error);
cloud_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_color", error));
- cloud_scale = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_scale", error)[0];
+ cloud_scale = LLWLParamManager::getInstance()->mCurParams.getFloat("cloud_scale", error);
cloud_pos_density1 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density1", error));
cloud_pos_density2 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density2", error));
@@ -825,7 +825,7 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo
// Haze color above cloud
vary_HazeColor = (blue_horizon * blue_weight * (sunlight + ambient)
- + componentMult(haze_horizon.mV[0] * haze_weight, sunlight * temp2.mV[0] + ambient)
+ + componentMult(haze_horizon * haze_weight, sunlight * temp2.mV[0] + ambient)
);
// Increase ambient when there are more clouds
@@ -836,7 +836,7 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo
// Haze color below cloud
LLColor3 additiveColorBelowCloud = (blue_horizon * blue_weight * (sunlight + tmpAmbient)
- + componentMult(haze_horizon.mV[0] * haze_weight, sunlight * temp2.mV[0] + tmpAmbient)
+ + componentMult(haze_horizon * haze_weight, sunlight * temp2.mV[0] + tmpAmbient)
);
// Final atmosphere additive
@@ -1002,7 +1002,7 @@ void LLVOSky::calcAtmospherics(void)
//haze color
vary_HazeColor =
(blue_horizon * blue_weight * (sunlight*(1.f - cloud_shadow) + tmpAmbient)
- + componentMult(haze_horizon.mV[0] * haze_weight, sunlight*(1.f - cloud_shadow) * temp2.mV[0] + tmpAmbient)
+ + componentMult(haze_horizon * haze_weight, sunlight*(1.f - cloud_shadow) * temp2.mV[0] + tmpAmbient)
);
//brightness of surface both sunlight and ambient
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index d3a42583ea..6e6898d80a 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -410,7 +410,7 @@ public:
LLColor3 blue_density;
LLColor3 blue_horizon;
F32 haze_density;
- LLColor3 haze_horizon;
+ F32 haze_horizon;
F32 density_multiplier;
F32 max_y;
LLColor3 glow;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 03d4c51aff..438d578ac5 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4939,6 +4939,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
fullbright = TRUE;
}
+ if (hud_group)
+ { //all hud attachments are fullbright
+ fullbright = TRUE;
+ }
+
const LLTextureEntry* te = facep->getTextureEntry();
tex = facep->getTexture();
@@ -4968,7 +4973,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
}
else if (gPipeline.canUseVertexShaders()
- && group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD
&& LLPipeline::sRenderBump
&& te->getShiny())
{ //shiny
@@ -5033,9 +5037,12 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
}
- //not sure why this is here -- shiny HUD attachments maybe? -- davep 5/11/2010
- if (!is_alpha && te->getShiny() && LLPipeline::sRenderBump)
- {
+
+ if (!gPipeline.canUseVertexShaders() &&
+ !is_alpha &&
+ te->getShiny() &&
+ LLPipeline::sRenderBump)
+ { //shiny as an extra pass when shaders are disabled
registerFace(group, facep, LLRenderPass::PASS_SHINY);
}
}
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 20b34637b8..e386112334 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -194,7 +194,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader)
shader->uniform4fv("waterPlane", 1, mWaterPlane.mV);
shader->uniform1f("waterFogDensity", getFogDensity());
shader->uniform1f("waterFogKS", mWaterFogKS);
- shader->uniform4f("distance_multiplier", 0, 0, 0, 0);
+ shader->uniform1f("distance_multiplier", 0);
}
}
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 55608a059f..49d9d44d74 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -64,7 +64,6 @@
LLWLParamManager::LLWLParamManager() :
//set the defaults for the controls
- // index is from sWLUniforms in pipeline.cpp line 979
/// Sun Delta Terrain tweak variables.
mSunDeltaYaw(180.0f),
@@ -72,10 +71,10 @@ LLWLParamManager::LLWLParamManager() :
mWLGamma(1.0f, "gamma"),
mBlueHorizon(0.25f, 0.25f, 1.0f, 1.0f, "blue_horizon", "WLBlueHorizon"),
- mHazeDensity(1.0f, 1.0f, 1.0f, 0.5f, "haze_density"),
+ mHazeDensity(1.0f, "haze_density"),
mBlueDensity(0.25f, 0.25f, 0.25f, 1.0f, "blue_density", "WLBlueDensity"),
mDensityMult(1.0f, "density_multiplier", 1000),
- mHazeHorizon(1.0f, 1.0f, 1.0f, 0.5f, "haze_horizon"),
+ mHazeHorizon(1.0f, "haze_horizon"),
mMaxAlt(4000.0f, "max_y"),
// Lighting
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index bc984b9126..72422500fc 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -102,9 +102,8 @@ struct WLFloatControl {
{
}
- inline WLFloatControl & operator = (LLVector4 const & val) {
- x = val.mV[0];
-
+ inline WLFloatControl & operator = (F32 val) {
+ x = val;
return *this;
}
@@ -340,10 +339,10 @@ public:
/// Atmospherics
WLColorControl mBlueHorizon;
- WLColorControl mHazeDensity;
+ WLFloatControl mHazeDensity;
WLColorControl mBlueDensity;
WLFloatControl mDensityMult;
- WLColorControl mHazeHorizon;
+ WLFloatControl mHazeHorizon;
WLFloatControl mMaxAlt;
/// Lighting
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 5bb7025031..b04d30db55 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -41,33 +41,7 @@
LLWLParamSet::LLWLParamSet(void) :
mName("Unnamed Preset"),
mCloudScrollXOffset(0.f), mCloudScrollYOffset(0.f)
-{
-/* REMOVE or init the LLSD
- const std::map<std::string, LLVector4>::value_type hardcodedPreset[] = {
- std::make_pair("lightnorm", LLVector4(0.f, 0.707f, -0.707f, 0.f)),
- std::make_pair("sunlight_color", LLVector4(0.6f, 0.6f, 2.83f, 2.27f)),
- std::make_pair("ambient", LLVector4(0.27f, 0.33f, 0.44f, 1.19f)),
- std::make_pair("blue_horizon", LLVector4(0.3f, 0.4f, 0.9f, 1.f)),
- std::make_pair("blue_density", LLVector4(0.3f, 0.4f, 0.8f, 1.f)),
- std::make_pair("haze_horizon", LLVector4(0.6f, 0.6f, 0.6f, 1.f)),
- std::make_pair("haze_density", LLVector4(0.3f, 0.3f, 0.3f, 1.f)),
- std::make_pair("cloud_shadow", LLVector4(0.f, 0.f, 0.f, 0.f)),
- std::make_pair("density_multiplier", LLVector4(0.001f, 0.001f, 0.001f, 0.001f)),
- std::make_pair("distance_multiplier", LLVector4(1.f, 1.f, 1.f, 1.f)),
- std::make_pair("max_y", LLVector4(600.f, 600.f, 600.f, 0.f)),
- std::make_pair("glow", LLVector4(15.f, 0.001f, -0.03125f, 0.f)),
- std::make_pair("cloud_color", LLVector4(0.0f, 0.0f, 0.0f, 0.0f)),
- std::make_pair("cloud_pos_density1", LLVector4(0.f, 0.f, 0.f, 1.f)),
- std::make_pair("cloud_pos_density2", LLVector4(0.f, 0.f, 0.f, 1.f)),
- std::make_pair("cloud_scale", LLVector4(0.42f, 0.f, 0.f, 1.f)),
- std::make_pair("gamma", LLVector4(2.0f, 2.0f, 2.0f, 0.0f)),
- };
- std::map<std::string, LLVector4>::value_type const * endHardcodedPreset =
- hardcodedPreset + LL_ARRAY_SIZE(hardcodedPreset);
-
- mParamValues.insert(hardcodedPreset, endHardcodedPreset);
-*/
-}
+{}
static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
@@ -79,55 +53,78 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
i != mParamValues.endMap();
++i)
{
-
-
const std::string& param = i->first;
- if( param == "star_brightness" || param == "preset_num" || param == "sun_angle" ||
+ if (param == "star_brightness" || param == "preset_num" || param == "sun_angle" ||
param == "east_angle" || param == "enable_cloud_scroll" ||
param == "cloud_scroll_rate" || param == "lightnorm" )
{
continue;
}
- if(param == "cloud_pos_density1")
+ if (param == "cloud_pos_density1")
{
LLVector4 val;
val.mV[0] = F32(i->second[0].asReal()) + mCloudScrollXOffset;
val.mV[1] = F32(i->second[1].asReal()) + mCloudScrollYOffset;
val.mV[2] = (F32) i->second[2].asReal();
val.mV[3] = (F32) i->second[3].asReal();
+
stop_glerror();
shader->uniform4fv(param, 1, val.mV);
stop_glerror();
- }
+ }
+ else if (param == "cloud_scale" || param == "cloud_shadow" ||
+ param == "density_multiplier" || param == "distance_multiplier" ||
+ param == "haze_density" || param == "haze_horizon" ||
+ param == "max_y" )
+ {
+ F32 val = (F32) i->second[0].asReal();
+
+ stop_glerror();
+ shader->uniform1f(param, val);
+ stop_glerror();
+ }
else // param is the uniform name
{
- LLVector4 val;
-
// handle all the different cases
- if(i->second.isArray() && i->second.size() == 4)
+ if (i->second.isArray() && i->second.size() == 4)
{
+ LLVector4 val;
+
val.mV[0] = (F32) i->second[0].asReal();
val.mV[1] = (F32) i->second[1].asReal();
val.mV[2] = (F32) i->second[2].asReal();
val.mV[3] = (F32) i->second[3].asReal();
+
+ stop_glerror();
+ shader->uniform4fv(param, 1, val.mV);
+ stop_glerror();
}
- else if(i->second.isReal())
+ else if (i->second.isReal())
{
- val.mV[0] = (F32) i->second.asReal();
+ F32 val = (F32) i->second.asReal();
+
+ stop_glerror();
+ shader->uniform1f(param, val);
+ stop_glerror();
}
- else if(i->second.isInteger())
+ else if (i->second.isInteger())
{
- val.mV[0] = (F32) i->second.asReal();
+ S32 val = (S32) i->second.asInteger();
+
+ stop_glerror();
+ shader->uniform1i(param, val);
+ stop_glerror();
}
- else if(i->second.isBoolean())
+ else if (i->second.isBoolean())
{
- val.mV[0] = i->second.asBoolean();
+ S32 val = (i->second.asBoolean() ? 1 : 0);
+
+ stop_glerror();
+ shader->uniform1i(param, val);
+ stop_glerror();
}
- stop_glerror();
- shader->uniform4fv(param, 1, val.mV);
- stop_glerror();
}
}
}
@@ -148,7 +145,8 @@ void LLWLParamSet::set(const std::string& paramName, float x)
}
}
-void LLWLParamSet::set(const std::string& paramName, float x, float y) {
+void LLWLParamSet::set(const std::string& paramName, float x, float y)
+{
mParamValues[paramName][0] = x;
mParamValues[paramName][1] = y;
}
@@ -194,7 +192,6 @@ void LLWLParamSet::set(const std::string& paramName, const LLColor4 & val)
LLVector4 LLWLParamSet::getVector(const std::string& paramName, bool& error)
{
-
// test to see if right type
LLSD cur_val = mParamValues.get(paramName);
if (!cur_val.isArray())
@@ -215,7 +212,6 @@ LLVector4 LLWLParamSet::getVector(const std::string& paramName, bool& error)
F32 LLWLParamSet::getFloat(const std::string& paramName, bool& error)
{
-
// test to see if right type
LLSD cur_val = mParamValues.get(paramName);
if (cur_val.isArray() && cur_val.size() != 0)
@@ -234,8 +230,6 @@ F32 LLWLParamSet::getFloat(const std::string& paramName, bool& error)
return 0;
}
-
-
void LLWLParamSet::setSunAngle(float val)
{
// keep range 0 - 2pi
@@ -263,7 +257,6 @@ void LLWLParamSet::setEastAngle(float val)
mParamValues["east_angle"] = val;
}
-
void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
{
// set up the iterators
@@ -282,7 +275,6 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
// Iterate through values
for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter)
{
-
// If param exists in both src and dest, set the holder variables, otherwise skip
if(src.mParamValues.has(iter->first) && dest.mParamValues.has(iter->first))
{
diff --git a/indra/newview/llwlparamset.h b/indra/newview/llwlparamset.h
index 3c44ed3bb8..b087119dd5 100644
--- a/indra/newview/llwlparamset.h
+++ b/indra/newview/llwlparamset.h
@@ -110,7 +110,7 @@ public:
/// \param error A flag to set if it's not the proper return type
LLVector4 getVector(const std::string& paramName, bool& error);
- /// Get an integer parameter
+ /// Get a float parameter
/// \param paramName The name of the parameter to set.
/// \param error A flag to set if it's not the proper return type
F32 getFloat(const std::string& paramName, bool& error);
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 676287c0ad..fbd8b3ada3 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1161,24 +1161,13 @@ void send_agent_resume()
static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin)
{
- LLVector3d pos_global;
- LLVector3 pos_local;
- U8 bits;
+ LLVector3d pos_local;
- bits = compact_local & 0xFF;
- pos_local.mV[VZ] = F32(bits) * 4.f;
- compact_local >>= 8;
+ pos_local.mdV[VZ] = (compact_local & 0xFFU) * 4;
+ pos_local.mdV[VY] = (compact_local >> 8) & 0xFFU;
+ pos_local.mdV[VX] = (compact_local >> 16) & 0xFFU;
- bits = compact_local & 0xFF;
- pos_local.mV[VY] = (F32)bits;
- compact_local >>= 8;
-
- bits = compact_local & 0xFF;
- pos_local.mV[VX] = (F32)bits;
-
- pos_global.setVec( pos_local );
- pos_global += region_origin;
- return pos_global;
+ return region_origin + pos_local;
}
void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const
@@ -1199,23 +1188,20 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
iter != LLCharacter::sInstances.end(); ++iter)
{
LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
- if(!pVOAvatar->isDead() && !pVOAvatar->isSelf())
+ LLVector3d pos_global = pVOAvatar->getPositionGlobal();
+ LLUUID uuid = pVOAvatar->getID();
+ if( !pVOAvatar->isDead()
+ && !pVOAvatar->isSelf()
+ && !uuid.isNull() &&
+ dist_vec_squared(pos_global, relative_to) <= radius_squared)
{
- LLUUID uuid = pVOAvatar->getID();
- if(!uuid.isNull())
+ if(positions != NULL)
{
- LLVector3d pos_global = pVOAvatar->getPositionGlobal();
- if(dist_vec_squared(pos_global, relative_to) <= radius_squared)
- {
- if(positions != NULL)
- {
- positions->push_back(pos_global);
- }
- if(avatar_ids !=NULL)
- {
- avatar_ids->push_back(uuid);
- }
- }
+ positions->push_back(pos_global);
+ }
+ if(avatar_ids !=NULL)
+ {
+ avatar_ids->push_back(uuid);
}
}
}
@@ -1233,9 +1219,9 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
{
LLUUID uuid = regionp->mMapAvatarIDs.get(i);
// if this avatar doesn't already exist in the list, add it
- if(uuid.notNull() && avatar_ids!=NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
+ if(uuid.notNull() && avatar_ids != NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
{
- if(positions != NULL)
+ if (positions != NULL)
{
positions->push_back(pos_global);
}
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index e50851b8e7..a3ccf87cfc 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -77,6 +77,7 @@ LLUIImagePtr LLWorldMapView::sAvatarYouLargeImage = NULL;
LLUIImagePtr LLWorldMapView::sAvatarLevelImage = NULL;
LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL;
LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL;
+LLUIImagePtr LLWorldMapView::sAvatarUnknownImage = NULL;
LLUIImagePtr LLWorldMapView::sTelehubImage = NULL;
LLUIImagePtr LLWorldMapView::sInfohubImage = NULL;
@@ -120,6 +121,7 @@ void LLWorldMapView::initClass()
sAvatarLevelImage = LLUI::getUIImage("map_avatar_32.tga");
sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_32.tga");
sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_32.tga");
+ sAvatarUnknownImage = LLUI::getUIImage("map_avatar_unknown_32.tga");
sHomeImage = LLUI::getUIImage("map_home.tga");
sTelehubImage = LLUI::getUIImage("map_telehub.tga");
@@ -149,6 +151,7 @@ void LLWorldMapView::cleanupClass()
sAvatarLevelImage = NULL;
sAvatarAboveImage = NULL;
sAvatarBelowImage = NULL;
+ sAvatarUnknownImage = NULL;
sTelehubImage = NULL;
sInfohubImage = NULL;
@@ -513,7 +516,7 @@ void LLWorldMapView::draw()
TRUE,
"You are here",
"",
- llround(LLFontGL::getFontSansSerifSmall()->getLineHeight())); // offset vertically by one line, to avoid overlap with target tracking
+ LLFontGL::getFontSansSerifSmall()->getLineHeight()); // offset vertically by one line, to avoid overlap with target tracking
}
// Draw the current agent viewing angle
@@ -992,7 +995,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
const S32 TEXT_PADDING = DEFAULT_TRACKING_ARROW_SIZE + 2;
S32 half_text_width = llfloor(font->getWidthF32(label) * 0.5f);
text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING);
- text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset);
+ text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - font->getLineHeight() - TEXT_PADDING - vert_offset);
if (label != "")
{
@@ -1005,7 +1008,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
if (tooltip != "")
{
- text_y -= (S32)font->getLineHeight();
+ text_y -= font->getLineHeight();
font->renderUTF8(
tooltip, 0,
@@ -1147,17 +1150,25 @@ void LLWorldMapView::drawAvatar(F32 x_pixels,
F32 y_pixels,
const LLColor4& color,
F32 relative_z,
- F32 dot_radius)
+ F32 dot_radius,
+ bool unknown_relative_z)
{
const F32 HEIGHT_THRESHOLD = 7.f;
LLUIImagePtr dot_image = sAvatarLevelImage;
- if(relative_z < -HEIGHT_THRESHOLD)
+ if (unknown_relative_z)
{
- dot_image = sAvatarBelowImage;
+ dot_image = sAvatarUnknownImage;
}
- else if(relative_z > HEIGHT_THRESHOLD)
- {
- dot_image = sAvatarAboveImage;
+ else
+ {
+ if(relative_z < -HEIGHT_THRESHOLD)
+ {
+ dot_image = sAvatarBelowImage;
+ }
+ else if(relative_z > HEIGHT_THRESHOLD)
+ {
+ dot_image = sAvatarAboveImage;
+ }
}
S32 dot_width = llround(dot_radius * 2.f);
dot_image->draw(llround(x_pixels - dot_radius),
@@ -1203,7 +1214,7 @@ void LLWorldMapView::drawIconName(F32 x_pixels,
LLFontGL::NORMAL,
LLFontGL::DROP_SHADOW);
- text_y -= llround(LLFontGL::getFontSansSerif()->getLineHeight());
+ text_y -= LLFontGL::getFontSansSerif()->getLineHeight();
// render text
LLFontGL::getFontSansSerif()->renderUTF8(second_line, 0,
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index 9ab53b1ba3..a2a6dc53fb 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -112,7 +112,8 @@ public:
F32 y_pixels,
const LLColor4& color,
F32 relative_z = 0.f,
- F32 dot_radius = 3.f);
+ F32 dot_radius = 3.f,
+ bool reached_max_z = false);
static void drawIconName(F32 x_pixels,
F32 y_pixels,
const LLColor4& color,
@@ -138,6 +139,7 @@ public:
static LLUIImagePtr sAvatarLevelImage;
static LLUIImagePtr sAvatarAboveImage;
static LLUIImagePtr sAvatarBelowImage;
+ static LLUIImagePtr sAvatarUnknownImage;
static LLUIImagePtr sTelehubImage;
static LLUIImagePtr sInfohubImage;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c523a78b22..a64655960f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -203,10 +203,6 @@ extern S32 gBoxFrame;
extern BOOL gDisplaySwapBuffers;
extern BOOL gDebugGL;
-// hack counter for rendering a fixed number of frames after toggling
-// fullscreen to work around DEV-5361
-static S32 sDelayedVBOEnable = 0;
-
BOOL gAvatarBacklight = FALSE;
BOOL gDebugPipeline = FALSE;
@@ -411,6 +407,7 @@ LLPipeline::LLPipeline() :
mOldRenderDebugMask(0),
mGroupQ1Locked(false),
mGroupQ2Locked(false),
+ mResetVertexBuffers(false),
mLastRebuildPool(NULL),
mAlphaPool(NULL),
mSkyPool(NULL),
@@ -692,8 +689,6 @@ void LLPipeline::destroyGL()
if (LLVertexBuffer::sEnableVBOs)
{
- // render 30 frames after switching to work around DEV-5361
- sDelayedVBOEnable = 30;
LLVertexBuffer::sEnableVBOs = FALSE;
}
}
@@ -2523,15 +2518,6 @@ void LLPipeline::updateGeom(F32 max_dtime)
assertInitialized();
- if (sDelayedVBOEnable > 0)
- {
- if (--sDelayedVBOEnable <= 0)
- {
- resetVertexBuffers();
- LLVertexBuffer::sEnableVBOs = TRUE;
- }
- }
-
// notify various object types to reset internal cost metrics, etc.
// for now, only LLVOVolume does this to throttle LOD changes
LLVOVolume::preUpdateGeom();
@@ -6185,7 +6171,7 @@ LLSpatialPartition* LLPipeline::getSpatialPartition(LLViewerObject* vobj)
void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
{
- if (!drawable || drawable->isDead())
+ if (!drawable)
{
return;
}
@@ -6198,7 +6184,19 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
}
void LLPipeline::resetVertexBuffers()
-{
+{
+ mResetVertexBuffers = true;
+}
+
+void LLPipeline::doResetVertexBuffers()
+{
+ if (!mResetVertexBuffers)
+ {
+ return;
+ }
+
+ mResetVertexBuffers = false;
+
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
@@ -6224,11 +6222,9 @@ void LLPipeline::resetVertexBuffers()
if (LLVertexBuffer::sGLCount > 0)
{
- llwarns << "VBO wipe failed." << llendl;
+ llwarns << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << llendl;
}
- llassert(LLVertexBuffer::sGLCount == 0);
-
LLVertexBuffer::unbind();
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 670a23ef14..9ed38b1190 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -111,6 +111,7 @@ public:
void destroyGL();
void restoreGL();
void resetVertexBuffers();
+ void doResetVertexBuffers();
void resizeScreenTexture();
void releaseGLBuffers();
void releaseScreenBuffers();
@@ -654,6 +655,8 @@ protected:
bool mGroupQ2Locked;
bool mGroupQ1Locked;
+ bool mResetVertexBuffers; //if true, clear vertex buffers on next update
+
LLViewerObject::vobj_list_t mCreateQ;
LLDrawable::drawable_set_t mRetexturedList;
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 8baaa14595..b616e2327b 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -615,6 +615,9 @@
name="PanelFocusBackgroundColor"
reference="DkGray2" />
<color
+ name="PanelNotificationBackground"
+ value="1 0.3 0.3 0" />
+ <color
name="ParcelHoverColor"
reference="White" />
<color
@@ -747,6 +750,9 @@
name="TitleBarFocusColor"
reference="White_10" />
<color
+ name="ToastBackground"
+ value="0.3 0.3 0.3 0" />
+ <color
name="ToolTipBgColor"
value="0.937 0.89 0.655 1" />
<color
diff --git a/indra/newview/skins/default/textures/checker.png b/indra/newview/skins/default/textures/checker.png
new file mode 100644
index 0000000000..1ab87e3f02
--- /dev/null
+++ b/indra/newview/skins/default/textures/checker.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/map_avatar_unknown_32.tga b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga
new file mode 100644
index 0000000000..d1192478c6
--- /dev/null
+++ b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index e4a8622a4b..eabcc68916 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -122,6 +122,8 @@ with the same filename but different name
<texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" />
<texture name="Check_Mark" file_name="icons/check_mark.png" preload="true" />
+ <texture name="Checker" file_name="checker.png" preload="false" />
+
<texture name="Command_AboutLand_Icon" file_name="toolbar_icons/land.png" preload="true" />
<texture name="Command_Appearance_Icon" file_name="toolbar_icons/appearance.png" preload="true" />
<texture name="Command_Avatar_Icon" file_name="toolbar_icons/avatars.png" preload="true" />
diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml
index 930bbaa8cb..d11373ce1d 100644
--- a/indra/newview/skins/default/xui/en/floater_aaa.xml
+++ b/indra/newview/skins/default/xui/en/floater_aaa.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- legacy_header_height="18"
can_minimize="false"
can_tear_off="false"
can_resize="true"
@@ -16,67 +15,98 @@
save_dock_state="true"
save_visibility="true"
single_instance="true"
- width="320">
- <string name="nudge_parabuild" translate="false">Nudge 1</string>
- <string name="test_the_vlt">This string CHANGE2 is extracted.</string>
- <string name="testing_eli">Just a test. changes.</string>
- <text_editor
- parse_urls="true"
- bg_readonly_color="ChatHistoryBgColor"
- bg_writeable_color="ChatHistoryBgColor"
- border_visible="false"
- follows="all"
- font="SansSerif"
- left="1"
- top="20"
- layout="topleft"
- height="260"
- name="chat_history"
- max_length="200000"
- parse_highlights="true"
- text_color="ChatHistoryTextColor"
- text_readonly_color="ChatHistoryTextColor"
- translate="false"
- track_end="true"
- wrap="true"
- width="320">
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- Really long line that is long enough to wrap once with jyg descenders.
- </text_editor>
+ width="650">
+ <text left="0"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="top">
+this
+is
+some
+text
+that
+is
+top
+aligned</text>
+ <text left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ bottom="-5"
+ clip_partial="true"
+ width="100"
+ valign="center">
+this
+is
+some
+text
+that
+is
+center
+aligned</text>
+ <text left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="bottom">
+this
+is
+some
+text
+that
+is
+bottom
+aligned</text>
+ <text_editor left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="top">
+this
+is
+some
+text
+that
+is
+top
+aligned
+ </text_editor>
+ <text_editor left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ bottom="-5"
+ clip_partial="true"
+ width="100"
+ valign="center">
+this
+is
+some
+text
+that
+is
+center
+aligned
+ </text_editor>
+ <text_editor left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="bottom">
+this
+is
+some
+text
+that
+is
+bottom
+aligned
+ </text_editor>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 1d5a6740b7..3a6c2678c1 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -192,12 +192,12 @@
type="string"
length="1"
follows="left|top"
- height="20"
+ height="18"
layout="topleft"
left_pad="2"
valign="center"
name="ContentRatingText"
- top_delta="0"
+ top_delta="-2"
width="250">
Adult
</text>
@@ -209,7 +209,7 @@
layout="topleft"
left="10"
name="Owner:"
- top_pad="1"
+ top_pad="3"
width="100">
Owner:
</text>
@@ -736,7 +736,7 @@
height="16"
layout="topleft"
left_pad="10"
- top_delta="-3"
+ top_delta="-1"
mouse_opaque="false"
name="region_maturity_text"
valign="center"
@@ -1210,7 +1210,7 @@ Only large parcels can be listed in search.
type="string"
length="1"
follows="left|top"
- text_color="white"
+ text_color="White"
height="16"
layout="topleft"
left="10"
@@ -1500,7 +1500,7 @@ Only large parcels can be listed in search.
layout="topleft"
left="20"
name="Snapshot:"
- text_color="white"
+ text_color="White"
top="225"
width="200">
Snapshot:
@@ -1546,7 +1546,7 @@ Only large parcels can be listed in search.
layout="topleft"
left="255"
top="282"
- text_color="white"
+ text_color="White"
name="landing_point"
word_wrap="true"
width="200">
@@ -1576,7 +1576,7 @@ Only large parcels can be listed in search.
<text
type="string"
length="1"
- text_color="white"
+ text_color="White"
follows="left|top"
height="16"
layout="topleft"
@@ -1951,7 +1951,7 @@ Only large parcels can be listed in search.
name="access_estate_defined">
(Defined by the Estate)
</panel.string>
- <panel.string
+ <panel.string
name="estate_override">
One or more of these options is set at the estate level
</panel.string>
@@ -2085,7 +2085,7 @@ Only large parcels can be listed in search.
column_padding="0"
follows="top|bottom"
heading_height="14"
- height="120"
+ height="125"
layout="topleft"
left="0"
multi_select="true"
@@ -2134,7 +2134,7 @@ Only large parcels can be listed in search.
column_padding="0"
follows="top|bottom"
heading_height="14"
- height="120"
+ height="125"
layout="topleft"
left="0"
multi_select="true"
diff --git a/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml
new file mode 100644
index 0000000000..b5538a511c
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ height="190"
+ layout="topleft"
+ name="Anim Preview"
+ help_topic="animation_anim_preview"
+ title="ANIMATION.ANIM"
+ width="300">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left="10"
+ mouse_opaque="false"
+ name="name_label"
+ top="20"
+ width="275">
+ Name:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="19"
+ layout="topleft"
+ left_delta="0"
+ max_length_bytes="63"
+ name="name_form"
+ top_pad="0"
+ width="280" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left_delta="0"
+ mouse_opaque="false"
+ name="description_label"
+ top_pad="10"
+ width="270">
+ Description:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="19"
+ layout="topleft"
+ left_delta="0"
+ max_length_bytes="127"
+ name="description_form"
+ top_pad="0"
+ width="280" />
+ <button
+ follows="left|bottom"
+ height="22"
+ label="Upload (L$[AMOUNT])"
+ layout="topleft"
+ left="45"
+ name="ok_btn"
+ top_pad="60"
+ width="150" />
+ <button
+ follows="right|bottom"
+ height="22"
+ label="Cancel"
+ label_selected="Cancel"
+ layout="topleft"
+ name="cancel_btn"
+ left_pad="5"
+ width="90" />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml
index cb6b2f6ebc..cb6b2f6ebc 100644
--- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml
diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml
index 35918e9705..38428b36fc 100644
--- a/indra/newview/skins/default/xui/en/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_build_options.xml
@@ -1,70 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- height="198"
+ height="170"
layout="topleft"
name="build options floater"
help_topic="build_options_floater"
save_rect="true"
title="GRID OPTIONS"
width="264">
- <floater.string
- name="grid_screen_text">
- Screen
- </floater.string>
- <floater.string
- name="grid_local_text">
- Local
- </floater.string>
- <floater.string
- name="grid_world_text">
- World
- </floater.string>
- <floater.string
- name="grid_reference_text">
- Reference
- </floater.string>
- <floater.string
- name="grid_attachment_text">
- Attachment
- </floater.string>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- tool_tip="Grid opacity"
- name="grid_mode_label"
- top_pad="30"
- width="123">
- Mode
- </text>
- <combo_box
- height="23"
- layout="topleft"
- left_pad="9"
- follows="left|top"
- name="combobox grid mode"
- tool_tip="Choose the type of grid ruler for positioning the object"
- top_delta="-3"
- width="108">
- <combo_box.item
- label="World grid"
- name="World"
- value="World" />
- <combo_box.item
- label="Local grid"
- name="Local"
- value="Local" />
- <combo_box.item
- label="Reference grid"
- name="Reference"
- value="Reference" />
- <combo_box.commit_callback
- function="GridOptions.gridMode"/>
- </combo_box>
<spinner
control_name="GridResolution"
follows="left|top"
@@ -77,7 +20,7 @@
max_val="5"
min_val="0.01"
name="GridResolution"
- top_pad="4"
+ top_pad="30"
width="200" />
<spinner
control_name="GridDrawSize"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml
index 92001534e7..ac96a70805 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml
@@ -62,7 +62,7 @@
layout="topleft"
left="10"
name="buy_text"
- text_color="white"
+ text_color="White"
top="220"
use_ellipses="true"
width="260">
diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
index 6afa24d04a..553c5d51d0 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
@@ -215,7 +215,7 @@
<text
type="string"
length="1"
- text_color="0.7 0.7 0.7 0.5"
+ text_color="LtGray_50"
follows="top|left"
layout="topleft"
halign="right"
@@ -229,7 +229,7 @@
<text
type="string"
length="1"
- text_color="0.7 0.7 0.7 0.5"
+ text_color="LtGray_50"
follows="top|left"
layout="topleft"
halign="right"
@@ -243,7 +243,7 @@ Re-enter amount to see the latest exchange rate.
<text
type="string"
length="1"
- text_color="0.7 0.7 0.7 0.5"
+ text_color="LtGray_50"
follows="top|left"
layout="topleft"
halign="right"
@@ -257,7 +257,7 @@ Re-enter amount to see the latest exchange rate.
<text
type="string"
length="1"
- text_color="0.7 0.7 0.7 0.5"
+ text_color="LtGray_50"
follows="top|left"
layout="topleft"
halign="right"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml
index 8dfb6ba00c..5fdd4aa49d 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml
@@ -89,7 +89,7 @@
left_delta="0"
line_spacing.pixels="7"
name="buy_text"
- text_color="white"
+ text_color="White"
top_pad="5"
use_ellipses="true"
width="260"
@@ -106,7 +106,7 @@ Buy for L$[AMOUNT] from:
left_delta="0"
line_spacing.pixels="7"
name="buy_name_text"
- text_color="white"
+ text_color="White"
top_pad="5"
use_ellipses="true"
width="260">
diff --git a/indra/newview/skins/default/xui/en/floater_choose_group.xml b/indra/newview/skins/default/xui/en/floater_choose_group.xml
index dc1ee5f24e..2cf6e682fd 100644
--- a/indra/newview/skins/default/xui/en/floater_choose_group.xml
+++ b/indra/newview/skins/default/xui/en/floater_choose_group.xml
@@ -20,7 +20,7 @@
Choose a group:
</text>
<scroll_list
- height="160"
+ height="165"
layout="topleft"
left_delta="0"
name="group list"
diff --git a/indra/newview/skins/default/xui/en/floater_fast_timers.xml b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
index 49aa8f3840..77adb5524e 100644
--- a/indra/newview/skins/default/xui/en/floater_fast_timers.xml
+++ b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
@@ -22,7 +22,6 @@
top="5"
width="180"
height="40"
- pad_bottom="-5"
label="Pause"
font="SansSerifHuge"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml
index 6f387f4800..3d33d19de5 100644
--- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml
+++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml
@@ -99,7 +99,7 @@
halign="center"
font="SansSerifMedium"
font_shadow="hard"
- valign="bottom">
+ valign="top">
Drag items here to create folders
</text>
</panel>
@@ -114,8 +114,8 @@
height="20"
wrap="true"
halign="left"
- valign="bottom"
- font="SansSerif" />
+ valign="center"
+ font="SansSerif"/>
<button
label="Send to Marketplace"
tool_tip="Push to my Marketplace Storefront"
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index eebc5ddc72..0e211551e6 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -117,18 +117,18 @@
name="lod_tab_border"
top_pad="0"
width="619" />
- <text
- follows="left|top"
- height="18"
- initial_value="Source"
- layout="topleft"
- left="75"
- name="source"
- text_color="ModelUploaderLabels"
- top="15"
- valign="center"
- value="Source"
- width="335" />
+ <text
+ follows="left|top"
+ height="18"
+ initial_value="Source"
+ layout="topleft"
+ left="75"
+ name="source"
+ text_color="ModelUploaderLabels"
+ top="15"
+ valign="center"
+ value="Source"
+ width="335"/>
<text
follows="left|top"
halign="right"
@@ -163,7 +163,7 @@
name="high_label"
text_color="ModelUploaderLabels"
top_pad="10"
- valign="center"
+ valign="top"
value="High"
width="65" />
<combo_box
@@ -240,34 +240,34 @@
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="high_triangles"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="high_vertices"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
- height="18"
+ height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="high_status"
- valign="center"
+ valign="top"
value=""
width="65" />
<icon
@@ -277,7 +277,7 @@
left_delta="20"
mouse_opaque="true"
name="status_icon_high"
- top_delta="0"
+ top_delta="-2"
width="16" />
<text
follows="left|top"
@@ -288,7 +288,7 @@
name="medium_label"
text_color="ModelUploaderLabels"
top_pad="15"
- valign="center"
+ valign="top"
value="Medium"
width="65" />
<combo_box
@@ -368,34 +368,34 @@
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="medium_triangles"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="medium_vertices"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
- height="18"
+ height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="medium_status"
- valign="center"
+ valign="top"
value=""
width="65" />
<icon
@@ -405,7 +405,7 @@
left_delta="20"
mouse_opaque="true"
name="status_icon_medium"
- top_delta="0"
+ top_delta="-2"
width="16" />
<text
follows="left|top"
@@ -416,7 +416,7 @@
name="low_label"
text_color="ModelUploaderLabels"
top_pad="15"
- valign="center"
+ valign="top"
value="Low"
width="65" />
<combo_box
@@ -496,34 +496,34 @@
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="low_triangles"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="low_vertices"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
- height="18"
+ height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="low_status"
- valign="center"
+ valign="top"
value=""
width="65" />
<icon
@@ -533,7 +533,7 @@
left_delta="20"
mouse_opaque="true"
name="status_icon_low"
- top_delta="0"
+ top_delta="-2"
width="16" />
<text
follows="left|top"
@@ -544,7 +544,7 @@
name="lowest_label"
text_color="ModelUploaderLabels"
top_pad="15"
- valign="center"
+ valign="top"
value="Lowest"
width="65" />
<combo_box
@@ -624,34 +624,34 @@
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="lowest_triangles"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
- height="18"
+ height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="lowest_vertices"
- valign="center"
+ valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
- height="18"
+ height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="lowest_status"
- valign="center"
+ valign="top"
value=""
width="65" />
<icon
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index 402868bb97..b2662331b0 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -100,7 +100,7 @@
help_topic="preferences_colors_tab"
name="colors" />
<panel
- class="panel_preference"
+ class="panel_preference_privacy"
filename="panel_preferences_privacy.xml"
label="Privacy"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_animation.xml b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
index 8427c7b06f..3ea5f54f2c 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
@@ -41,18 +41,26 @@
label_selected="Stop"
layout="topleft"
left="10"
- name="Anim play btn"
+ name="Inworld"
tool_tip="Play this animation so that others can see it"
top="47"
- width="125" />
+ width="125">
+ <button.commit_callback
+ function="PreviewAnim.Play"
+ parameter="Inworld" />
+ </button>
<button
height="20"
label="Play Locally"
label_selected="Stop"
layout="topleft"
left_pad="5"
- name="Anim audition btn"
+ name="Locally"
tool_tip="Play this animation so that only you can see it"
top_delta="0"
- width="125" />
+ width="125">
+ <button.commit_callback
+ function="PreviewAnim.Play"
+ parameter="Locally" />
+ </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml
index f95f21e63a..a04050e7eb 100644
--- a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml
@@ -32,6 +32,26 @@
bg_alpha_color="blue"
height="11"
min_height="0"
+ visible="false"
+ background_visible="true">
+ <text follows="top|left|right" halign="center" text_color="white">flex</text>
+ </layout_panel>
+ <layout_panel name="flex"
+ auto_resize="true"
+ user_resize="true"
+ bg_alpha_color="blue"
+ height="11"
+ min_height="0"
+ visible="true"
+ background_visible="true">
+ <text follows="top|left|right" halign="center" text_color="white">flex</text>
+ </layout_panel>
+ <layout_panel name="flex"
+ auto_resize="true"
+ user_resize="true"
+ bg_alpha_color="blue"
+ height="11"
+ min_height="0"
background_visible="true">
<text follows="top|left|right" halign="center" text_color="white">flex</text>
</layout_panel>
diff --git a/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml b/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml
new file mode 100644
index 0000000000..d11373ce1d
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ can_minimize="false"
+ can_tear_off="false"
+ can_resize="true"
+ can_drag_on_left="false"
+ can_close="true"
+ can_dock="true"
+ bevel_style="in"
+ height="300"
+ layout="topleft"
+ name="Test Floater"
+ save_rect="true"
+ title="TEST FLOATER"
+ save_dock_state="true"
+ save_visibility="true"
+ single_instance="true"
+ width="650">
+ <text left="0"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="top">
+this
+is
+some
+text
+that
+is
+top
+aligned</text>
+ <text left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ bottom="-5"
+ clip_partial="true"
+ width="100"
+ valign="center">
+this
+is
+some
+text
+that
+is
+center
+aligned</text>
+ <text left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="bottom">
+this
+is
+some
+text
+that
+is
+bottom
+aligned</text>
+ <text_editor left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="top">
+this
+is
+some
+text
+that
+is
+top
+aligned
+ </text_editor>
+ <text_editor left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ bottom="-5"
+ clip_partial="true"
+ width="100"
+ valign="center">
+this
+is
+some
+text
+that
+is
+center
+aligned
+ </text_editor>
+ <text_editor left_pad="5"
+ follows="left|top|bottom"
+ top="5"
+ clip_partial="true"
+ bottom="-5"
+ width="100"
+ valign="bottom">
+this
+is
+some
+text
+that
+is
+bottom
+aligned
+ </text_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml
index 2df9bb35fe..1d31fbd6dc 100644
--- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml
@@ -8,21 +8,7 @@
help_topic="floater_test_textbox"
translate="false"
width="800">
- <text
- type="string"
- length="1"
- height="90"
- layout="topleft"
- left="10"
- top_pad="30"
- width="300">
- First line of multiple lines
-Second line of multiple lines
-Third line of multiple lines
-Fourth line of multiple lines
-Fifth line of multiple lines
- </text>
- <text
+ <text
clip_partial="true"
top_pad="10"
left="10"
diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
new file mode 100644
index 0000000000..44b6a63bca
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ can_minimize="false"
+ height="550"
+ layout="topleft"
+ name="TexFetchDebugger"
+ help_topic="texfetchdebugger"
+ title="Texture Fetching Debugger"
+ width="540">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left="10"
+ name="total_num_fetched_label"
+ top="30"
+ width="400">
+ 1, Total number of fetched textures: [NUM]
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_num_fetching_requests_label"
+ top_delta="25"
+ width="400">
+ 2, Total number of fetching requests: [NUM]
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_num_cache_hits_label"
+ top_delta="25"
+ width="400">
+ 3, Total number of cache hits: [NUM]
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_num_visible_tex_label"
+ top_delta="25"
+ width="400">
+ 4, Total number of visible textures: [NUM]
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_num_visible_tex_fetch_req_label"
+ top_delta="25"
+ width="450">
+ 5, Total number of visible texture fetching requests: [NUM]
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_fetched_data_label"
+ top_delta="25"
+ width="530">
+ 6, Total number of fetched data: [SIZE1]KB, Decoded Data: [SIZE2]KB, [PIXEL]MPixels
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_fetched_vis_data_label"
+ top_delta="25"
+ width="480">
+ 7, Total number of visible data: [SIZE1]KB, Decoded Data: [SIZE2]KB
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_fetched_rendered_data_label"
+ top_delta="25"
+ width="530">
+ 8, Total number of rendered data: [SIZE1]KB, Decoded Data: [SIZE2]KB, [PIXEL]MPixels
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_cache_read_label"
+ top_delta="25"
+ width="400">
+ 9, Total time on cache readings: [TIME] seconds
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_cache_write_label"
+ top_delta="25"
+ width="400">
+ 10, Total time on cache writings: [TIME] seconds
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_decode_label"
+ top_delta="25"
+ width="400">
+ 11, Total time on decodings: [TIME] seconds
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_gl_label"
+ top_delta="25"
+ width="400">
+ 12, Total time on gl texture creation: [TIME] seconds
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_http_label"
+ top_delta="25"
+ width="400">
+ 13, Total time on HTTP fetching: [TIME] seconds
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_fetch_label"
+ top_delta="25"
+ width="400">
+ 14, Total time on entire fetching: [TIME] seconds
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_refetch_vis_cache_label"
+ top_delta="25"
+ width="540">
+ 15, Refetching visibles from cache, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left_delta="0"
+ name="total_time_refetch_vis_http_label"
+ top_delta="25"
+ width="540">
+ 16, Refetching visibles from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels
+ </text>
+ <spinner
+ decimal_digits="2"
+ follows="left|top"
+ height="20"
+ increment="0.01"
+ initial_value="1.0"
+ label="17, Ratio of Texel/Pixel:"
+ label_width="130"
+ layout="topleft"
+ left_delta="0"
+ max_val="10.0"
+ min_val="0.01"
+ name="texel_pixel_ratio"
+ top_delta="30"
+ width="200">
+ <spinner.commit_callback
+ function="TexFetchDebugger.ChangeTexelPixelRatio" />
+ </spinner>
+ <button
+ follows="left|top"
+ height="20"
+ label="Start"
+ layout="topleft"
+ left_delta="0"
+ name="start_btn"
+ top_delta="30"
+ width="70">
+ <button.commit_callback
+ function="TexFetchDebugger.Start" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Reset"
+ layout="topleft"
+ left_pad="7"
+ name="clear_btn"
+ top_delta="0"
+ width="70">
+ <button.commit_callback
+ function="TexFetchDebugger.Clear" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Close"
+ layout="topleft"
+ left_pad="7"
+ name="close_btn"
+ top_delta="0"
+ width="70">
+ <button.commit_callback
+ function="TexFetchDebugger.Close" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Cache Read"
+ layout="topleft"
+ left="10"
+ name="cacheread_btn"
+ top_delta="30"
+ width="80">
+ <button.commit_callback
+ function="TexFetchDebugger.CacheRead" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Cache Write"
+ layout="topleft"
+ left_pad="7"
+ name="cachewrite_btn"
+ top_delta="0"
+ width="80">
+ <button.commit_callback
+ function="TexFetchDebugger.CacheWrite" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="HTTP"
+ layout="topleft"
+ left_pad="7"
+ name="http_btn"
+ top_delta="0"
+ width="70">
+ <button.commit_callback
+ function="TexFetchDebugger.HTTPLoad" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Decode"
+ layout="topleft"
+ left_pad="7"
+ name="decode_btn"
+ top_delta="0"
+ width="70">
+ <button.commit_callback
+ function="TexFetchDebugger.Decode" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="GL Texture"
+ layout="topleft"
+ left_pad="7"
+ name="gl_btn"
+ top_delta="0"
+ width="70">
+ <button.commit_callback
+ function="TexFetchDebugger.GLTexture" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Refetch Vis Cache"
+ layout="topleft"
+ left="10"
+ name="refetchviscache_btn"
+ top_delta="30"
+ width="120">
+ <button.commit_callback
+ function="TexFetchDebugger.RefetchVisCache" />
+ </button>
+ <button
+ follows="left|top"
+ height="20"
+ label="Refetch Vis HTTP"
+ layout="topleft"
+ left_pad="7"
+ name="refetchvishttp_btn"
+ top_delta="0"
+ width="120">
+ <button.commit_callback
+ function="TexFetchDebugger.RefetchVisHTTP" />
+ </button>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index f9147ea650..2d63c94fe1 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -14,7 +14,27 @@
save_visibility="true"
sound_flags="0"
width="295">
- <floater.string
+ <floater.string
+ name="grid_screen_text">
+ Screen
+ </floater.string>
+ <floater.string
+ name="grid_local_text">
+ Local
+ </floater.string>
+ <floater.string
+ name="grid_world_text">
+ World
+ </floater.string>
+ <floater.string
+ name="grid_reference_text">
+ Reference
+ </floater.string>
+ <floater.string
+ name="grid_attachment_text">
+ Attachment
+ </floater.string>
+ <floater.string
name="status_rotate">
Drag colored bands to rotate object
</floater.string>
@@ -312,20 +332,48 @@
top_pad="0"
name="checkbox snap to grid"
width="134" />
- <button
- left_pad="0"
- label="Options..."
+ <combo_box
+ height="20"
+ layout="topleft"
+ follows="left|top"
+ name="combobox grid mode"
+ tool_tip="Choose the type of grid ruler for positioning the object"
+ top="83"
+ left="195"
+ top_pad="0"
+ width="60">
+ <combo_box.item
+ label="World"
+ name="World"
+ value="World" />
+ <combo_box.item
+ label="Local"
+ name="Local"
+ value="Local" />
+ <combo_box.item
+ label="Reference"
+ name="Reference"
+ value="Reference" />
+ <combo_box.commit_callback
+ function="BuildTool.gridMode"/>
+ </combo_box>
+
+ <button
+ left="259"
+ label=""
+ image_selected="ForwardArrow_Press"
+ image_unselected="ForwardArrow_Off"
layout="topleft"
follows="top|left"
name="Options..."
tool_tip="See more grid options"
top="83"
- right="-35"
- width="65"
- height="21" >
+ width="25"
+ height="20" >
<button.commit_callback
function="BuildTool.gridOptions"/>
</button>
+
<button
follows="left|top"
height="20"
diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml
index 72e6187a14..fcaae9d172 100644
--- a/indra/newview/skins/default/xui/en/floater_toybox.xml
+++ b/indra/newview/skins/default/xui/en/floater_toybox.xml
@@ -18,7 +18,7 @@
<text
follows="left|top"
font="SansSerifMedium"
- valign="bottom"
+ valign="top"
halign="left"
height="20"
layout="topleft"
@@ -33,7 +33,7 @@
<text
follows="left|top"
font="SansSerifMedium"
- valign="bottom"
+ valign="top"
halign="left"
height="20"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
index cea19ec75c..d99b29f324 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
@@ -71,7 +71,7 @@
layout="topleft"
left_pad="10"
name="user_text"
- text_color="white"
+ text_color="White"
top="4"
use_ellipses="true"
value="My Avatar:"
diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml
index 8d14c974b4..bfeb8fc470 100644
--- a/indra/newview/skins/default/xui/en/inspect_object.xml
+++ b/indra/newview/skins/default/xui/en/inspect_object.xml
@@ -56,7 +56,7 @@ owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
halign="right"
right="-5"
name="price_text"
- text_color="white"
+ text_color="White"
top="60"
font_shadow="none"
width="60">
@@ -90,6 +90,7 @@ L$30,000
follows="all"
font="SansSerifSmall"
height="13"
+ clip="false"
name="object_media_url"
width="207"
left_pad="2"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 8b0152b1a2..5d46b0f98d 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1876,7 +1876,7 @@
<menu_item_check.on_click
function="Advanced.ToggleConsole"
parameter="texture" />
- </menu_item_check>
+ </menu_item_check>
<menu_item_check
label="Debug Console"
name="Debug Console"
@@ -1931,7 +1931,20 @@
function="Advanced.ToggleConsole"
parameter="scene view" />
</menu_item_check>
-
+ <menu_item_call
+ enabled="false"
+ visible="false"
+ label="Texture Fetch Debug Console"
+ name="Texture Fetch Debug Console">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="tex_fetch_debugger" />
+ <on_enable
+ function="Develop.SetTexFetchDebugger" />
+ <on_visible
+ function="Develop.SetTexFetchDebugger" />
+ </menu_item_call>
+
<menu_item_separator/>
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index af75d49353..59dd17ea9d 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1667,7 +1667,7 @@ Unable to create output file: [FILE]
icon="alertmodal.tga"
name="DoNotSupportBulkAnimationUpload"
type="alertmodal">
-[APP_NAME] does not currently support bulk upload of animation files.
+[APP_NAME] does not currently support bulk upload of BVH format animation files.
<tag>fail</tag>
</notification>
@@ -6409,11 +6409,11 @@ Grant this request?
<form name="form">
<button
index="-2"
- name="Mute"
+ name="Client_Side_Mute"
text="Block"/>
<button
index="-1"
- name="Ignore"
+ name="Client_Side_Ignore"
text="Ignore"/>
</form>
</notification>
@@ -6428,11 +6428,11 @@ Grant this request?
<form name="form">
<button
index="-2"
- name="Mute"
+ name="Client_Side_Mute"
text="Block"/>
<button
index="-1"
- name="Ignore"
+ name="Client_Side_Ignore"
text="Ignore"/>
</form>
</notification>
diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
index 1e6a31d388..7c67fd7f83 100644
--- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
@@ -28,7 +28,7 @@
layout="topleft"
left_pad="10"
name="title_text"
- text_color="white"
+ text_color="White"
top="5"
width="250">
Block List
diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml
index 2645d472f9..5c5c718bdf 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_header.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml
@@ -23,7 +23,7 @@
<text
parse_urls="false"
allow_scroll="false"
- v_pad = "7"
+ v_pad = "6"
read_only = "true"
follows="left|right"
font.style="BOLD"
@@ -37,7 +37,7 @@
top="0"
translate="false"
use_ellipses="true"
- valign="bottom"
+ valign="top"
value="TestString PleaseIgnore" />
<text
allow_scroll="false"
@@ -49,7 +49,7 @@
left_pad="5"
name="time_box"
right="-5"
- top="8"
+ top="7"
value="23:30"
width="110" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml
index 6af1105400..1b97de2b05 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml
@@ -16,13 +16,13 @@
top="3"
width="18" />
<text_chat
- top="5"
+ top="3"
left="30"
height="120"
text_color="white"
word_wrap="true"
mouse_opaque="true"
- valign="bottom"
+ valign="top"
name="msg_text">
</text_chat>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
index df459b4083..4b05ab27e4 100644
--- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
@@ -29,7 +29,7 @@
width="380" />
<icon
height="16"
- color="0.75 0.75 0.75 1"
+ color="LtGray"
follows="top|left"
image_name="Inv_Object"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index 69a692e2c4..f34b913218 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -164,7 +164,7 @@
layout="topleft"
left_pad="8"
name="edit_wearable_title"
- text_color="white"
+ text_color="White"
top="3"
value="Editing Shape"
use_ellipses="true"
@@ -190,7 +190,7 @@
layout="topleft"
left="10"
name="description_text"
- text_color="white"
+ text_color="White"
top="10"
value="Shape:"
width="150" />
@@ -254,7 +254,7 @@
name="description"
prevalidate_callback="ascii"
select_on_focus="true"
- text_color="black"
+ text_color="Black"
top_pad="3"
width="290" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index a7178dc288..eea2606125 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -172,7 +172,7 @@ including the Everyone and Owner Roles.
draw_heading="true"
draw_stripes="false"
heading_height="23"
- height="130"
+ height="132"
layout="topleft"
search_column="1"
left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
index 383e637ace..413e22e444 100644
--- a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<inbox_inventory_panel
+ accepts_drag_and_drop="false"
name="inventory_inbox"
start_folder="Received Items"
follows="all" layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml
index 4251128714..2e5d650902 100644
--- a/indra/newview/skins/default/xui/en/panel_instant_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml
@@ -15,7 +15,7 @@
<panel
background_visible="true"
bevel_style="in"
- bg_alpha_color="black"
+ bg_alpha_color="Black"
follows="top"
height="24"
label="im_header"
@@ -64,7 +64,7 @@
left_pad="5"
name="user_name"
parse_urls="false"
- text_color="white"
+ text_color="White"
top="8"
translate="false"
use_ellipses="true"
@@ -90,7 +90,7 @@
layout="topleft"
left="10"
name="message"
- text_color="white"
+ text_color="White"
top="33"
use_ellipses="true"
value=""
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index d2088594dd..fd6e96b9a7 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -271,7 +271,7 @@
<text_editor
bg_readonly_color="DkGray2"
follows="all"
- height="70"
+ height="75"
layout="topleft"
left="0"
max_length="127"
@@ -288,7 +288,7 @@
layout="topleft"
left="0"
name="folder_label"
- top_pad="15"
+ top_pad="10"
value="Landmark location:"
width="290" />
<combo_box
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index d6d8b2a83e..1c882bb099 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -80,7 +80,6 @@
top="16"
width="288" />
<recent_inventory_panel
- accepts_drag_and_drop="false"
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 4bf420b79f..3edeb9aa36 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -70,7 +70,7 @@
layout="topleft"
auto_resize="true"
user_resize="true"
- min_width="480"
+ min_width="410"
name="navigation_layout_panel"
width="480">
<panel
@@ -148,15 +148,15 @@
layout="topleft"
auto_resize="true"
user_resize="true"
- min_width="315"
+ min_width="185"
name="favorites_layout_panel"
- width="315">
+ width="320">
<icon
follows="top|left"
height="25"
image_name="ChatBarHandle"
layout="topleft"
- left="-318"
+ left="-323"
name="resize_handle"
top="4"
width="5" />
@@ -171,16 +171,17 @@
name="favorite"
image_drag_indication="Accordion_ArrowOpened_Off"
tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
- width="311">
+ width="320">
<label
follows="left|top"
- height="15"
+ height="13"
layout="topleft"
left="10"
name="favorites_bar_label"
text_color="LtGray"
tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
- top="12"
+ top="13"
+ valign="bottom"
width="102">
Favorites Bar
</label>
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml
index d492f9bd68..d683116eb8 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml
@@ -1,35 +1,63 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel
- height="300"
follows="all"
+ height="300"
+ help_topic="nearby_chat"
layout="topleft"
name="nearby_chat"
- help_topic="nearby_chat"
width="320">
- <check_box
- bottom_delta="36"
- control_name="TranslateChat"
- enabled="true"
- height="16"
- label="Translate chat"
- layout="topleft"
- left="5"
- name="translate_chat_checkbox"
- width="230" />
- <chat_history
- parse_urls="true"
- bg_readonly_color="ChatHistoryBgColor"
- bg_writeable_color="ChatHistoryBgColor"
- follows="all"
- left="5"
- top_delta="17"
- layout="topleft"
- height="260"
- name="chat_history"
- parse_highlights="true"
- text_color="ChatHistoryTextColor"
- text_readonly_color="ChatHistoryTextColor"
- right_widget_pad="5"
- left_widget_pad="0"
- width="315" />
+ <layout_stack
+ follows="all"
+ height="295"
+ layout="topleft"
+ left="0"
+ name="stack"
+ top="5"
+ orientation="vertical"
+ width="320">
+ <layout_panel
+ auto_resize="false"
+ height="26"
+ layout="topleft"
+ left_delta="0"
+ name="translate_chat_checkbox_lp"
+ top_delta="0"
+ visible="true"
+ width="313">
+ <check_box
+ top="10"
+ control_name="TranslateChat"
+ enabled="true"
+ height="16"
+ label="Translate chat"
+ layout="topleft"
+ left="5"
+ name="translate_chat_checkbox"
+ width="300" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="true"
+ height="277"
+ left_delta="0"
+ layout="topleft"
+ name="chat_history_lp"
+ width="318">
+ <chat_history
+ bg_readonly_color="ChatHistoryBgColor"
+ bg_writeable_color="ChatHistoryBgColor"
+ follows="all"
+ layout="topleft"
+ left="5"
+ left_widget_pad="0"
+ height="272"
+ name="chat_history"
+ parse_highlights="true"
+ parse_urls="true"
+ right_widget_pad="5"
+ text_color="ChatHistoryTextColor"
+ text_readonly_color="ChatHistoryTextColor"
+ top="0"
+ width="313" />
+ </layout_panel>
+ </layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml
index f6f62ac54e..94c468e1bb 100644
--- a/indra/newview/skins/default/xui/en/panel_notification.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification.xml
@@ -3,8 +3,8 @@
background_opaque="false"
border_visible="false"
background_visible="true"
- bg_alpha_color="1 0.3 0.3 0"
- bg_opaque_color="1 0.3 0.3 0"
+ bg_alpha_color="PanelNotificationBackground"
+ bg_opaque_color="PanelNotificationBackground"
label="notification_panel"
layout="topleft"
left="0"
@@ -20,8 +20,8 @@
border_visible="false"
bevel_style="none"
background_visible="true"
- bg_alpha_color="0.3 0.3 0.3 0"
- bg_opaque_color="0.3 0.3 0.3 0"
+ bg_alpha_color="ToastBackground"
+ bg_opaque_color="ToastBackground"
follows="left|right|top"
height="100"
label="info_panel"
@@ -39,7 +39,7 @@
left="10"
name="text_box"
read_only="true"
- text_color="white"
+ text_color="White"
top="10"
visible="false"
width="285"
@@ -52,7 +52,7 @@
layout="topleft"
left="10"
name="caution_text_box"
- text_color="1 0.82 0.46 1"
+ text_color="NotifyCautionBoxColor"
top="10"
visible="false"
width="285"
@@ -60,7 +60,7 @@
<text_editor
h_pad="0"
v_pad="0"
- bg_readonly_color="0.0 0.0 0.0 0"
+ bg_readonly_color="Transparent"
border_visible="false"
embedded_items="false"
enabled="false"
@@ -73,8 +73,8 @@
name="text_editor_box"
read_only="true"
tab_stop="false"
- text_color="white"
- text_readonly_color="white"
+ text_color="White"
+ text_readonly_color="White"
top="10"
visible="false"
width="285"
diff --git a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml
index b1a7697e83..dadbd9c9ab 100644
--- a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml
@@ -25,7 +25,7 @@
layout="topleft"
left_pad="5"
name="message"
- text_color="white"
+ text_color="White"
top="15"
use_ellipses="true"
value=""
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 9827180aa7..24882988b0 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -331,7 +331,7 @@
</text>
<radio_group
control_name="LetterKeysFocusChatBar"
- height="20"
+ height="34"
layout="topleft"
left="35"
top_pad="0"
@@ -339,7 +339,7 @@
<radio_item
label="Starts local chat"
name="radio_start_chat"
- top_delta="20"
+ top="0"
layout="topleft"
height="16"
left="0"
@@ -364,7 +364,7 @@
layout="topleft"
left="30"
name="title_afk_text"
- top_pad="15"
+ top_pad="5"
width="190">
Away timeout:
</text>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index 1f92244eb9..b71586aab1 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -63,7 +63,7 @@
layout="topleft"
left_pad="0"
name="mute_chb_label"
- top_delta="0"
+ top_delta="-1"
width="150"
wrap="true">
Mute when minimized
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index d453a970e7..22c1139cdb 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -67,7 +67,6 @@
label_shadow="true"
name="buyL"
pad_right="0"
- pad_bottom="2"
tool_tip="Click to buy more L$"
top="0"
width="80" />
@@ -87,7 +86,6 @@
left_pad="0"
label_shadow="true"
name="goShop"
- pad_bottom="2"
tool_tip="Open Second Life Marketplace"
top="0"
width="65" />
diff --git a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml
index 5e74689c5a..007b73a4bc 100644
--- a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml
@@ -13,7 +13,7 @@
follows="left|right"
background_opaque="false"
background_visible="true"
- bg_alpha_color="0.0 0.0 0.0 0.0" >
+ bg_alpha_color="SysWellItemUnselected" >
<text
clip_partial="true"
top="2"
@@ -22,7 +22,7 @@
height="28"
layout="topleft"
follows="right|left"
- text_color="white"
+ text_color="White"
use_ellipses="true"
word_wrap="true"
mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
index c89e1dc215..c5b0be0616 100644
--- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
@@ -44,7 +44,7 @@
parse_urls="false"
use_ellipses="true"
name="region"
- text_color="white"
+ text_color="White"
top="4"
value="..."
width="330" />
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index 062c403a26..0b5aff54ca 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -59,7 +59,7 @@
left="20"
name="toast_text"
word_wrap="true"
- text_color="white"
+ text_color="White"
top="5"
translate="false"
use_ellipses="true"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index 29aa6d1039..ee790e8dd4 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -48,7 +48,7 @@
height="300"
width="330" />
</layout_panel>
- <layout_panel
+ <layout_panel
width="330"
layout="topleft"
auto_resize="true"
@@ -73,6 +73,7 @@
<string name="InboxLabelWithArg">Received items ([NUM])</string>
<string name="InboxLabelNoArg">Received items</string>
<button
+ control_name="InventoryInboxToggleState"
label="Received items"
font="SansSerifMedium"
name="inbox_btn"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 4bc72be49b..9752652679 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -369,6 +369,9 @@ Please try logging in again in a minute.</string>
<string name="anim_yes_happy">Yes (Happy)</string>
<string name="anim_yes_head">Yes</string>
+ <!-- build floater -->
+ <string name="multiple_textures">Multiple</string>
+
<!-- world map -->
<string name="texture_loading">Loading...</string>
<string name="worldmap_offline">Offline</string>
@@ -3238,6 +3241,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="IM_to_label">To</string>
<string name="IM_moderator_label">(Moderator)</string>
<string name="Saved_message">(Saved [LONG_TIMESTAMP])</string>
+ <string name="IM_unblock_only_groups_friends">To see this message, you must uncheck &apos;Only friends and groups can call or IM me&apos; in Preferences/Privacy.</string>
<!-- voice calls -->
<string name="answered_call">Your call has been answered</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml
index 1bb3188cc8..8a4ccb19f9 100644
--- a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml
@@ -17,13 +17,13 @@
<voice_call_invited_style
font="SansSerifSmall"
font.style="NORMAL"
- color="0.5 0.5 0.5 0.5"/>
+ color="AvatarListItemIconVoiceInvitedColor"/>
<!-- styles for avatar item JOINED to voice call -->
<voice_call_joined_style
font="SansSerifSmall"
font.style="NORMAL"
- color="white"/>
+ color="White"/>
<!-- styles for avatar item which HAS LEFT voice call -->
<voice_call_left_style
@@ -35,11 +35,11 @@
<online_style
font="SansSerifSmall"
font.style="NORMAL"
- color="white"/>
+ color="White"/>
<!-- styles for OFFLINE avatar item -->
<offline_style
font="SansSerifSmall"
font.style="NORMAL"
- color="0.5 0.5 0.5 1.0"/>
+ color="Gray"/>
</avatar_list_item>
diff --git a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml
index 0eec002006..0016a8cf53 100644
--- a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml
@@ -24,7 +24,7 @@
parse_urls="false"
use_ellipses="true"
name="item_name"
- text_color="white"
+ text_color="White"
top="5"
value="..."
width="359" />
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index e2baba92a3..2b2c3faf91 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -21,7 +21,7 @@
font="SansSerifSmall"
hover_glow_amount="0.15"
halign="center"
- pad_bottom="3"
+ pad_bottom="1"
height="23"
scale_image="true"
handle_right_mouse="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/check_box.xml b/indra/newview/skins/default/xui/en/widgets/check_box.xml
index cca64fad2a..8947024e45 100644
--- a/indra/newview/skins/default/xui/en/widgets/check_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/check_box.xml
@@ -10,7 +10,7 @@
text_readonly_color="LabelDisabledColor"/>
<check_box.check_button name="CheckboxCtrl Button"
left="2"
- bottom="2"
+ bottom="1"
width="13"
height="13"
commit_on_return="false"
diff --git a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml
index 96d72c78a6..d83f44737e 100644
--- a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml
@@ -24,7 +24,7 @@
parse_urls="false"
use_ellipses="true"
name="item_name"
- text_color="white"
+ text_color="White"
top="5"
value="..."
width="359" />
diff --git a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml
index 6c60624805..8c805da048 100644
--- a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml
@@ -9,7 +9,7 @@
width="380">
<item_icon
height="16"
- color="0.75 0.75 0.75 1"
+ color="LtGray"
follows="top|left"
image_name="Inv_Object"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 3e2202b20f..0586119681 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -11,7 +11,7 @@ label_pad_left - padding to the left of tab button labels
halign="center"
font="SansSerifSmall"
tab_height="21"
- label_pad_bottom="2"
+ label_pad_bottom="1"
label_pad_left="4">
<!--
Possible additional attributes for tabs:
diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp
index 4c0959d1a9..e7ef017760 100644
--- a/indra/newview/tests/llworldmipmap_test.cpp
+++ b/indra/newview/tests/llworldmipmap_test.cpp
@@ -100,9 +100,9 @@ namespace tut
{
S32 level = mMap->scaleToLevel(0.0);
ensure("scaleToLevel() test 1 failed", level == LLWorldMipmap::MAP_LEVELS);
- level = mMap->scaleToLevel(LLWorldMipmap::MAP_TILE_SIZE);
+ level = mMap->scaleToLevel((F32)LLWorldMipmap::MAP_TILE_SIZE);
ensure("scaleToLevel() test 2 failed", level == 1);
- level = mMap->scaleToLevel(10 * LLWorldMipmap::MAP_TILE_SIZE);
+ level = mMap->scaleToLevel(10.f * LLWorldMipmap::MAP_TILE_SIZE);
ensure("scaleToLevel() test 3 failed", level == 1);
}
// Test 2 : globalToMipmap()
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 0931c4ec9b..9bf755c8f8 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -1047,9 +1047,13 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libuuid.so.16")
self.path("libuuid.so.16.0.22")
self.path("libSDL-1.2.so.0.11.3")
+ self.path("libSDL-1.2.so.0")
self.path("libdirectfb-1.4.so.5.0.4")
+ self.path("libdirectfb-1.4.so.5")
self.path("libfusion-1.4.so.5.0.4")
+ self.path("libfusion-1.4.so.5")
self.path("libdirect-1.4.so.5.0.4")
+ self.path("libdirect-1.4.so.5")
self.path("libopenjpeg.so.1.4.0")
self.path("libopenjpeg.so.1")
self.path("libopenjpeg.so")