summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/edit-me-to-trigger-new-build.txt4
-rw-r--r--indra/llappearance/llavatarjoint.cpp6
-rw-r--r--indra/llcommon/llapr.h2
-rw-r--r--indra/llcommon/llfasttimer.cpp8
-rw-r--r--indra/llcommon/llfasttimer.h10
-rw-r--r--indra/llcommon/llmemory.cpp85
-rw-r--r--indra/llcommon/llmemory.h4
-rw-r--r--indra/llcommon/llpreprocessor.h11
-rw-r--r--indra/llcommon/llsdutil.cpp2
-rw-r--r--indra/llcommon/llstring.h10
-rw-r--r--indra/llcommon/llsys.cpp63
-rw-r--r--indra/llcommon/llthread.cpp2
-rw-r--r--indra/llcommon/lltimer.cpp6
-rw-r--r--indra/llcommon/lltimer.h2
-rw-r--r--indra/llcommon/lluuid.cpp4
-rw-r--r--indra/llcommon/stdtypes.h2
-rw-r--r--indra/llinventory/llparcel.h6
-rw-r--r--indra/llinventory/llparcelflags.h2
-rw-r--r--indra/llmath/llmath.h3
-rw-r--r--indra/llmath/llsdutil_math.cpp2
-rw-r--r--indra/llmessage/message.h4
-rw-r--r--indra/llprimitive/llmaterial.cpp40
-rw-r--r--indra/llprimitive/llmaterial.h11
-rw-r--r--indra/llrender/llgl.cpp39
-rw-r--r--indra/llrender/llgl.h4
-rw-r--r--indra/llrender/llglheaders.h237
-rw-r--r--indra/llrender/llglslshader.cpp52
-rw-r--r--indra/llrender/llrender.cpp2
-rw-r--r--indra/llrender/llshadermgr.cpp60
-rw-r--r--indra/llrender/llshadermgr.h428
-rw-r--r--indra/llrender/llvertexbuffer.h43
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llui/llbutton.cpp8
-rw-r--r--indra/llui/llchat.h6
-rw-r--r--indra/llui/llfloater.cpp27
-rw-r--r--indra/llui/llfloater.h6
-rw-r--r--indra/llui/llfloaterreg.cpp8
-rw-r--r--indra/llui/llfloaterreg.h1
-rw-r--r--indra/llui/lllineeditor.h3
-rw-r--r--indra/llui/llmenugl.cpp4
-rw-r--r--indra/llui/llnotifications.cpp1
-rw-r--r--indra/llui/llnotifications.h1
-rw-r--r--indra/llui/llresmgr.cpp3
-rw-r--r--indra/llui/llsearcheditor.cpp22
-rw-r--r--indra/llui/llsearcheditor.h20
-rw-r--r--indra/llui/lltabcontainer.cpp3
-rw-r--r--indra/llui/lltoolbar.cpp4
-rw-r--r--indra/llui/lluictrl.cpp22
-rw-r--r--indra/llui/lluictrl.h4
-rw-r--r--indra/llui/lluiusage.cpp146
-rw-r--r--indra/llui/lluiusage.h57
-rw-r--r--indra/llui/llvirtualtrackball.cpp40
-rw-r--r--indra/llui/llvirtualtrackball.h3
-rw-r--r--indra/llvfs/lldir.cpp3
-rw-r--r--indra/llvfs/lldir.h5
-rw-r--r--indra/llvfs/lldir_solaris.cpp266
-rw-r--r--indra/llvfs/lldir_solaris.h61
-rw-r--r--indra/llvfs/llvfs.cpp24
-rw-r--r--indra/llwindow/llwindowsdl.cpp48
-rw-r--r--indra/llwindow/llwindowwin32.cpp67
-rw-r--r--indra/newview/CMakeLists.txt9
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/app_settings/commands.xml6
-rw-r--r--indra/newview/app_settings/settings.xml63
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl139
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/skyF.glsl16
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl117
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/lightUtil.glsl117
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/skyF.glsl19
-rw-r--r--indra/newview/llagent.cpp52
-rw-r--r--indra/newview/llagent.h3
-rw-r--r--indra/newview/llappviewer.cpp85
-rw-r--r--indra/newview/llappviewer.h3
-rw-r--r--indra/newview/llappviewerlinux.cpp10
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp13
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h2
-rw-r--r--indra/newview/llchatbar.cpp3
-rw-r--r--indra/newview/llchathistory.cpp63
-rw-r--r--indra/newview/llconversationmodel.cpp4
-rw-r--r--indra/newview/llconversationview.cpp11
-rw-r--r--indra/newview/llcurrencyuimanager.cpp7
-rw-r--r--indra/newview/lldirpicker.cpp4
-rw-r--r--indra/newview/lldirpicker.h2
-rw-r--r--indra/newview/lldrawable.cpp10
-rw-r--r--indra/newview/lldrawpoolavatar.cpp4
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp13
-rw-r--r--indra/newview/lldrawpoolwlsky.h4
-rw-r--r--indra/newview/lldynamictexture.cpp9
-rw-r--r--indra/newview/llenvironment.cpp34
-rw-r--r--indra/newview/llenvironment.h16
-rw-r--r--indra/newview/llface.cpp4
-rw-r--r--indra/newview/llfavoritesbar.cpp50
-rw-r--r--indra/newview/llfavoritesbar.h1
-rw-r--r--indra/newview/llfeaturemanager.cpp5
-rw-r--r--indra/newview/llfilepicker.cpp6
-rw-r--r--indra/newview/llfloateraddpaymentmethod.cpp81
-rw-r--r--indra/newview/llfloateraddpaymentmethod.h52
-rw-r--r--indra/newview/llfloaterbuycurrency.cpp131
-rw-r--r--indra/newview/llfloaterbuycurrency.h24
-rw-r--r--indra/newview/llfloatercreatelandmark.cpp323
-rw-r--r--indra/newview/llfloatercreatelandmark.h74
-rw-r--r--indra/newview/llfloaterenvironmentadjust.cpp113
-rw-r--r--indra/newview/llfloaterenvironmentadjust.h2
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp8
-rw-r--r--indra/newview/llfloaterhandler.cpp9
-rw-r--r--indra/newview/llfloaterhowto.cpp92
-rw-r--r--indra/newview/llfloaterhowto.h58
-rw-r--r--indra/newview/llfloaterimcontainer.cpp69
-rw-r--r--indra/newview/llfloaterimcontainer.h5
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp2
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp5
-rw-r--r--indra/newview/llfloaterlandholdings.cpp30
-rw-r--r--indra/newview/llfloaterlandholdings.h2
-rw-r--r--indra/newview/llfloatermodelpreview.cpp184
-rw-r--r--indra/newview/llfloaterreporter.cpp3
-rw-r--r--indra/newview/llfolderviewmodelinventory.h1
-rw-r--r--indra/newview/llinventorybridge.cpp63
-rw-r--r--indra/newview/llinventoryfilter.cpp137
-rw-r--r--indra/newview/llinventoryfilter.h26
-rw-r--r--indra/newview/llinventoryfunctions.cpp89
-rw-r--r--indra/newview/llinventoryfunctions.h2
-rw-r--r--indra/newview/llinventorypanel.cpp10
-rw-r--r--indra/newview/llinventorypanel.h22
-rw-r--r--indra/newview/lllandmarkactions.cpp22
-rw-r--r--indra/newview/lllandmarkactions.h6
-rw-r--r--indra/newview/lllocationinputctrl.cpp5
-rw-r--r--indra/newview/llmutelist.cpp15
-rw-r--r--indra/newview/llnavigationbar.cpp10
-rwxr-xr-xindra/newview/llnavigationbar.h2
-rw-r--r--indra/newview/llpaneleditsky.cpp119
-rw-r--r--indra/newview/llpaneleditsky.h2
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp43
-rw-r--r--indra/newview/llpanellandmarkinfo.h32
-rw-r--r--indra/newview/llpanellandmarks.cpp739
-rw-r--r--indra/newview/llpanellandmarks.h105
-rw-r--r--indra/newview/llpanelmaininventory.cpp50
-rw-r--r--indra/newview/llpanelmaininventory.h5
-rw-r--r--indra/newview/llpaneloutfitedit.cpp19
-rw-r--r--indra/newview/llpaneloutfitedit.h3
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp29
-rw-r--r--indra/newview/llpaneloutfitsinventory.h5
-rw-r--r--indra/newview/llpanelpeople.cpp1
-rw-r--r--indra/newview/llpanelplaces.cpp216
-rw-r--r--indra/newview/llpanelplaces.h17
-rw-r--r--indra/newview/llpanelplacestab.cpp8
-rw-r--r--indra/newview/llpanelplacestab.h20
-rw-r--r--indra/newview/llpanelteleporthistory.cpp359
-rw-r--r--indra/newview/llpanelteleporthistory.h54
-rw-r--r--indra/newview/llpaneltopinfobar.cpp3
-rw-r--r--indra/newview/llsidepanelappearance.cpp60
-rw-r--r--indra/newview/llsidepanelappearance.h5
-rw-r--r--indra/newview/llspatialpartition.cpp119
-rw-r--r--indra/newview/llstartup.cpp63
-rw-r--r--indra/newview/llstartup.h3
-rw-r--r--indra/newview/llstatusbar.cpp15
-rw-r--r--indra/newview/lltelemetry.cpp145
-rw-r--r--indra/newview/lltelemetry.h81
-rw-r--r--indra/newview/llteleporthistorystorage.cpp22
-rw-r--r--indra/newview/llteleporthistorystorage.h7
-rw-r--r--indra/newview/lltoastalertpanel.cpp33
-rw-r--r--indra/newview/lltoastalertpanel.h5
-rw-r--r--indra/newview/lltoastnotifypanel.cpp6
-rw-r--r--indra/newview/llurlfloaterdispatchhandler.cpp214
-rw-r--r--indra/newview/llurlfloaterdispatchhandler.h49
-rw-r--r--indra/newview/llviewerdisplay.cpp6
-rw-r--r--indra/newview/llviewerfloaterreg.cpp7
-rw-r--r--indra/newview/llviewerjoint.cpp6
-rw-r--r--indra/newview/llviewerjointmesh.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp140
-rw-r--r--indra/newview/llviewermenu.h4
-rw-r--r--indra/newview/llviewermenufile.cpp10
-rw-r--r--indra/newview/llviewermessage.cpp11
-rw-r--r--indra/newview/llviewerobject.cpp191
-rw-r--r--indra/newview/llviewerobject.h24
-rw-r--r--indra/newview/llviewerparcelmgr.cpp4
-rw-r--r--indra/newview/llviewerstats.cpp3
-rw-r--r--indra/newview/llviewertexture.cpp7
-rw-r--r--indra/newview/llviewerwindow.cpp192
-rw-r--r--indra/newview/llvoavatarself.cpp8
-rw-r--r--indra/newview/llvoicevivox.cpp96
-rw-r--r--indra/newview/llvoicevivox.h6
-rw-r--r--indra/newview/llvosky.cpp9
-rw-r--r--indra/newview/llvovolume.cpp254
-rw-r--r--indra/newview/llvovolume.h20
-rw-r--r--indra/newview/llworldmipmap.cpp2
-rw-r--r--indra/newview/pipeline.cpp344
-rw-r--r--indra/newview/pipeline.h5
-rw-r--r--indra/newview/skins/default/colors.xml6
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.pngbin0 -> 756 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Landmarks.pngbin0 -> 15870 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml11
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.pngbin0 -> 16287 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/add_payment_image_center.pngbin0 -> 31996 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/add_payment_image_left.pngbin0 -> 30102 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/add_payment_image_right.pngbin0 -> 29761 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/first_login_image_left.pngbin384997 -> 271413 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/first_login_image_right.pngbin340188 -> 366068 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_add_payment_method.xml140
-rw-r--r--indra/newview/skins/default/xui/en/floater_adjust_environment.xml96
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_currency.xml624
-rw-r--r--indra/newview/skins/default/xui/en/floater_create_landmark.xml113
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_fixedenvironment.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_how_to.xml19
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_appearance.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_scripts.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_other.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_self.xml343
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_other.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_self.xml477
-rw-r--r--indra/newview/skins/default/xui/en/menu_favorites.xml37
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml44
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_picks.xml26
-rw-r--r--indra/newview/skins/default/xui/en/menu_place_add_button.xml23
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_folder.xml43
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml122
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml46
-rw-r--r--indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml13
-rw-r--r--indra/newview/skins/default/xui/en/menu_teleport_history_item.xml46
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml513
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml121
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pick.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_favorites.xml22
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml40
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmarks.xml199
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml40
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml29
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml38
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_inventory.xml39
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml18
-rw-r--r--indra/newview/skins/default/xui/en/panel_place_profile.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml236
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml180
-rw-r--r--indra/newview/skins/default/xui/en/panel_teleport_history.xml35
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml31
-rw-r--r--indra/newview/skins/default/xui/en/teleport_strings.xml3
-rw-r--r--indra/newview/skins/default/xui/en/widgets/filter_editor.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/search_editor.xml4
262 files changed, 7766 insertions, 4892 deletions
diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt
index 48082f72f0..ade83202cf 100644
--- a/indra/edit-me-to-trigger-new-build.txt
+++ b/indra/edit-me-to-trigger-new-build.txt
@@ -1 +1,3 @@
-12
+euclid 5/29/2020
+euclid 7/23/2020
+euclid 4/29/2021
diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp
index 80b3e42b52..a1d4fe6423 100644
--- a/indra/llappearance/llavatarjoint.cpp
+++ b/indra/llappearance/llavatarjoint.cpp
@@ -103,7 +103,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
joint->setValid(valid, TRUE);
}
}
@@ -136,7 +136,7 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
joint->setVisible(visible, recursive);
}
}
@@ -167,7 +167,7 @@ void LLAvatarJoint::updateJointGeometry()
for (joints_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter);
joint->updateJointGeometry();
}
}
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index 255b50c8d0..565d7cfb63 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -29,7 +29,7 @@
#ifndef LL_LLAPR_H
#define LL_LLAPR_H
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
#include <sys/param.h> // Need PATH_MAX in APR headers...
#endif
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index 08ea668964..5b6a7b82f8 100644
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -43,7 +43,7 @@
#if LL_WINDOWS
#include "lltimer.h"
-#elif LL_LINUX || LL_SOLARIS
+#elif LL_LINUX
#include <sys/time.h>
#include <sched.h>
#include "lltimer.h"
@@ -64,7 +64,7 @@ bool BlockTimer::sLog = false;
std::string BlockTimer::sLogName = "";
bool BlockTimer::sMetricLog = false;
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
U64 BlockTimer::sClockResolution = 1000000000; // Nanosecond resolution
#else
U64 BlockTimer::sClockResolution = 1000000; // Microsecond resolution
@@ -151,12 +151,12 @@ void BlockTimer::setLogLock(LLMutex* lock)
//static
-#if (LL_DARWIN || LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
+#if (LL_DARWIN || LL_LINUX) && !(defined(__i386__) || defined(__amd64__))
U64 BlockTimer::countsPerSecond()
{
return sClockResolution;
}
-#else // windows or x86-mac or x86-linux or x86-solaris
+#else // windows or x86-mac or x86-linux
U64 BlockTimer::countsPerSecond()
{
#if LL_FASTTIMER_USE_RDTSC || !LL_WINDOWS
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index 5628a05b00..dfc63d08a2 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -125,9 +125,9 @@ public:
#endif
-#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
+#if (LL_LINUX) && !(defined(__i386__) || defined(__amd64__))
//
- // Linux and Solaris implementation of CPU clock - non-x86.
+ // Linux implementation of CPU clock - non-x86.
// This is accurate but SLOW! Only use out of desperation.
//
// Try to use the MONOTONIC clock if available, this is a constant time counter
@@ -153,12 +153,12 @@ public:
return (U32)(getCPUClockCount64() >> 8);
}
-#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
+#endif // (LL_LINUX) && !(defined(__i386__) || defined(__amd64__))
-#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__))
+#if (LL_LINUX || LL_DARWIN) && (defined(__i386__) || defined(__amd64__))
//
- // Mac+Linux+Solaris FAST x86 implementation of CPU clock
+ // Mac+Linux FAST x86 implementation of CPU clock
static U32 getCPUClockCount32()
{
U32 low(0),high(0);
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 1884d6f04f..ea84e4c1ea 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -35,7 +35,7 @@
# include <sys/types.h>
# include <mach/task.h>
# include <mach/mach_init.h>
-#elif LL_LINUX || LL_SOLARIS
+#elif LL_LINUX
# include <unistd.h>
#endif
@@ -55,7 +55,6 @@ static LLTrace::SampleStatHandle<F64Megabytes> sVirtualMem("virtual_mem", "virtu
U32Kilobytes LLMemory::sAllocatedMemInKB(0);
U32Kilobytes LLMemory::sAllocatedPageSizeInKB(0);
U32Kilobytes LLMemory::sMaxHeapSizeInKB(U32_MAX);
-BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE;
void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
{
@@ -75,10 +74,9 @@ void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
}
//static
-void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size, BOOL prevent_heap_failure)
+void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size)
{
sMaxHeapSizeInKB = U32Kilobytes::convert(max_heap_size);
- sEnableMemoryFailurePrevention = prevent_heap_failure ;
}
//static
@@ -158,56 +156,6 @@ void LLMemory::logMemoryInfo(BOOL update)
LL_INFOS() << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << LL_ENDL ;
}
-//return 0: everything is normal;
-//return 1: the memory pool is low, but not in danger;
-//return -1: the memory pool is in danger, is about to crash.
-//static
-bool LLMemory::isMemoryPoolLow()
-{
- static const U32Megabytes LOW_MEMORY_POOL_THRESHOLD(64);
- const static U32Megabytes MAX_SIZE_CHECKED_MEMORY_BLOCK(64);
- static void* last_reserved_address = NULL ;
-
- if(!sEnableMemoryFailurePrevention)
- {
- return false ; //no memory failure prevention.
- }
-
- if(sAvailPhysicalMemInKB < (LOW_MEMORY_POOL_THRESHOLD / 4)) //out of physical memory
- {
- return true ;
- }
-
- if(sAllocatedPageSizeInKB + (LOW_MEMORY_POOL_THRESHOLD / 4) > sMaxHeapSizeInKB) //out of virtual address space.
- {
- return true ;
- }
-
- bool is_low = (S32)(sAvailPhysicalMemInKB < LOW_MEMORY_POOL_THRESHOLD
- || sAllocatedPageSizeInKB + LOW_MEMORY_POOL_THRESHOLD > sMaxHeapSizeInKB) ;
-
- //check the virtual address space fragmentation
- if(!is_low)
- {
- if(!last_reserved_address)
- {
- last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK.value()) ;
- }
- else
- {
- last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK.value()) ;
- if(!last_reserved_address) //failed, try once more
- {
- last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK.value()) ;
- }
- }
-
- is_low = !last_reserved_address ; //allocation failed
- }
-
- return is_low ;
-}
-
//static
U32Kilobytes LLMemory::getAvailableMemKB()
{
@@ -309,35 +257,6 @@ U64 LLMemory::getCurrentRSS()
return rss;
}
-#elif LL_SOLARIS
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-
-U64 LLMemory::getCurrentRSS()
-{
- char path [LL_MAX_PATH]; /* Flawfinder: ignore */
-
- sprintf(path, "/proc/%d/psinfo", (int)getpid());
- int proc_fd = -1;
- if((proc_fd = open(path, O_RDONLY)) == -1){
- LL_WARNS() << "LLmemory::getCurrentRSS() unable to open " << path << ". Returning 0 RSS!" << LL_ENDL;
- return 0;
- }
- psinfo_t proc_psinfo;
- if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
- LL_WARNS() << "LLmemory::getCurrentRSS() Unable to read from " << path << ". Returning 0 RSS!" << LL_ENDL;
- close(proc_fd);
- return 0;
- }
-
- close(proc_fd);
-
- return((U64)proc_psinfo.pr_rssize * 1024);
-}
-
#else
U64 LLMemory::getCurrentRSS()
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index f04ae5f5cb..24f86cc11e 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -344,10 +344,9 @@ public:
// Return value is zero if not known.
static U64 getCurrentRSS();
static void* tryToAlloc(void* address, U32 size);
- static void initMaxHeapSizeGB(F32Gigabytes max_heap_size, BOOL prevent_heap_failure);
+ static void initMaxHeapSizeGB(F32Gigabytes max_heap_size);
static void updateMemoryInfo() ;
static void logMemoryInfo(BOOL update = FALSE);
- static bool isMemoryPoolLow();
static U32Kilobytes getAvailableMemKB() ;
static U32Kilobytes getMaxMemKB() ;
@@ -359,7 +358,6 @@ private:
static U32Kilobytes sAllocatedPageSizeInKB ;
static U32Kilobytes sMaxHeapSizeInKB;
- static BOOL sEnableMemoryFailurePrevention;
};
// LLRefCount moved to llrefcount.h
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index bae402110a..b17a8e761a 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -34,16 +34,7 @@
#include <endian.h>
#endif // LL_LINUX
-#if LL_SOLARIS
-# ifdef __sparc // Since we're talking Solaris 10 and up, only 64 bit is supported.
-# define LL_BIG_ENDIAN 1
-# define LL_SOLARIS_ALIGNED_CPU 1 // used to designate issues where SPARC alignment is addressed
-# define LL_SOLARIS_NON_MESA_GL 1 // The SPARC GL does not provide a MESA-based GL API
-# endif
-# include <sys/isa_defs.h> // ensure we know which end is up
-#endif // LL_SOLARIS
-
-#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)) || (defined(LL_SOLARIS) && defined(__i386)))
+#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)))
#define LL_LITTLE_ENDIAN 1
#else
#define LL_BIG_ENDIAN 1
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index 3f3edb661f..eb3a96b133 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -33,7 +33,7 @@
#if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h> // for htonl
-#elif LL_LINUX || LL_SOLARIS
+#elif LL_LINUX
# include <netinet/in.h>
#elif LL_DARWIN
# include <arpa/inet.h>
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 6b1a1e0a03..4263122f36 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -37,7 +37,7 @@
#include <map>
#include "llformat.h"
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
#include <wctype.h>
#include <wchar.h>
#endif
@@ -45,16 +45,10 @@
#include <string.h>
#include <boost/scoped_ptr.hpp>
-#if LL_SOLARIS
-// stricmp and strnicmp do not exist on Solaris:
-#define stricmp strcasecmp
-#define strnicmp strncasecmp
-#endif
-
const char LL_UNKNOWN_CHAR = '?';
class LLSD;
-#if LL_DARWIN || LL_LINUX || LL_SOLARIS
+#if LL_DARWIN || LL_LINUX
// Template specialization of char_traits for U16s. Only necessary on Mac and Linux (exists on Windows already)
#include <cstring>
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index eff4dd91ea..4e61fb8a58 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -88,17 +88,6 @@ using namespace llsd;
# include <stdexcept>
const char MEMINFO_FILE[] = "/proc/meminfo";
# include <gnu/libc-version.h>
-#elif LL_SOLARIS
-# include <stdio.h>
-# include <unistd.h>
-# include <sys/utsname.h>
-# define _STRUCTURED_PROC 1
-# include <sys/procfs.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <fcntl.h>
-# include <errno.h>
-extern int errno;
#endif
LLCPUInfo gSysCPU;
@@ -544,8 +533,6 @@ const std::string& LLOSInfo::getOSVersionString() const
U32 LLOSInfo::getProcessVirtualSizeKB()
{
U32 virtual_size = 0;
-#if LL_WINDOWS
-#endif
#if LL_LINUX
# define STATUS_SIZE 2048
LLFILE* status_filep = LLFile::fopen("/proc/self/status", "rb");
@@ -565,24 +552,6 @@ U32 LLOSInfo::getProcessVirtualSizeKB()
}
fclose(status_filep);
}
-#elif LL_SOLARIS
- char proc_ps[LL_MAX_PATH];
- sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid());
- int proc_fd = -1;
- if((proc_fd = open(proc_ps, O_RDONLY)) == -1){
- LL_WARNS() << "unable to open " << proc_ps << LL_ENDL;
- return 0;
- }
- psinfo_t proc_psinfo;
- if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
- LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL;
- close(proc_fd);
- return 0;
- }
-
- close(proc_fd);
-
- virtual_size = proc_psinfo.pr_size;
#endif
return virtual_size;
}
@@ -591,8 +560,6 @@ U32 LLOSInfo::getProcessVirtualSizeKB()
U32 LLOSInfo::getProcessResidentSizeKB()
{
U32 resident_size = 0;
-#if LL_WINDOWS
-#endif
#if LL_LINUX
LLFILE* status_filep = LLFile::fopen("/proc/self/status", "rb");
if (status_filep != NULL)
@@ -611,24 +578,6 @@ U32 LLOSInfo::getProcessResidentSizeKB()
}
fclose(status_filep);
}
-#elif LL_SOLARIS
- char proc_ps[LL_MAX_PATH];
- sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid());
- int proc_fd = -1;
- if((proc_fd = open(proc_ps, O_RDONLY)) == -1){
- LL_WARNS() << "unable to open " << proc_ps << LL_ENDL;
- return 0;
- }
- psinfo_t proc_psinfo;
- if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
- LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL;
- close(proc_fd);
- return 0;
- }
-
- close(proc_fd);
-
- resident_size = proc_psinfo.pr_rssize;
#endif
return resident_size;
}
@@ -773,11 +722,6 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
return U64Bytes(phys);
-#elif LL_SOLARIS
- U64 phys = 0;
- phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES));
- return U64Bytes(phys);
-
#else
return 0;
@@ -1066,13 +1010,6 @@ LLSD LLMemoryInfo::loadStatsMap()
}
}
-#elif LL_SOLARIS
- U64 phys = 0;
-
- phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024);
-
- stats.add("Total Physical KB", phys);
-
#elif LL_LINUX
std::ifstream meminfo(MEMINFO_FILE);
if (meminfo.is_open())
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 0b9dec969c..98905f3b71 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -36,7 +36,7 @@
#include "lltracethreadrecorder.h"
#include "llexception.h"
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
#include <sched.h>
#endif
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index 76e892212a..aaa6df325c 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -32,7 +32,7 @@
#if LL_WINDOWS
# include "llwin32headerslean.h"
-#elif LL_LINUX || LL_SOLARIS || LL_DARWIN
+#elif LL_LINUX || LL_DARWIN
# include <errno.h>
# include <sys/time.h>
#else
@@ -74,7 +74,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
ms_sleep((U32)(us / 1000));
return 0;
}
-#elif LL_LINUX || LL_SOLARIS || LL_DARWIN
+#elif LL_LINUX || LL_DARWIN
static void _sleep_loop(struct timespec& thiswait)
{
struct timespec nextwait;
@@ -187,7 +187,7 @@ F64 calc_clock_frequency()
#endif // LL_WINDOWS
-#if LL_LINUX || LL_DARWIN || LL_SOLARIS
+#if LL_LINUX || LL_DARWIN
// Both Linux and Mac use gettimeofday for accurate time
F64 calc_clock_frequency()
{
diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h
index ec70213447..010f290b24 100644
--- a/indra/llcommon/lltimer.h
+++ b/indra/llcommon/lltimer.h
@@ -27,7 +27,7 @@
#ifndef LL_TIMER_H
#define LL_TIMER_H
-#if LL_LINUX || LL_DARWIN || LL_SOLARIS
+#if LL_LINUX || LL_DARWIN
#include <sys/time.h>
#endif
#include <limits.h>
diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp
index b05630c6b5..e3b293e465 100644
--- a/indra/llcommon/lluuid.cpp
+++ b/indra/llcommon/lluuid.cpp
@@ -601,9 +601,7 @@ S32 LLUUID::getNodeID(unsigned char *node_id)
#define HAVE_NETINET_IN_H
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
-#if LL_SOLARIS
-#include <sys/sockio.h>
-#elif !LL_DARWIN
+#if !LL_DARWIN
#include <linux/sockios.h>
#endif
#endif
diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h
index 6c9871e76c..887f6ab733 100644
--- a/indra/llcommon/stdtypes.h
+++ b/indra/llcommon/stdtypes.h
@@ -57,7 +57,7 @@ typedef unsigned __int64 U64;
#else
typedef long long int S64;
typedef long long unsigned int U64;
-#if LL_DARWIN || LL_LINUX || LL_SOLARIS
+#if LL_DARWIN || LL_LINUX
#define S64L(a) (a##LL)
#define U64L(a) (a##ULL)
#endif
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 3b39aeb56b..5d08c1f4c6 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -295,7 +295,6 @@ public:
void setAllowTerraform(BOOL b){setParcelFlag(PF_ALLOW_TERRAFORM, b); }
void setAllowDamage(BOOL b) { setParcelFlag(PF_ALLOW_DAMAGE, b); }
void setAllowFly(BOOL b) { setParcelFlag(PF_ALLOW_FLY, b); }
- void setAllowLandmark(BOOL b){ setParcelFlag(PF_ALLOW_LANDMARK, b); }
void setAllowGroupScripts(BOOL b) { setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, b); }
void setAllowOtherScripts(BOOL b) { setParcelFlag(PF_ALLOW_OTHER_SCRIPTS, b); }
void setAllowDeedToGroup(BOOL b) { setParcelFlag(PF_ALLOW_DEED_TO_GROUP, b); }
@@ -476,11 +475,6 @@ public:
BOOL getAllowFly() const
{ return (mParcelFlags & PF_ALLOW_FLY) ? TRUE : FALSE; }
- // Remove permission restrictions for creating landmarks.
- // We should eventually remove this flag completely.
- BOOL getAllowLandmark() const
- { return TRUE; }
-
BOOL getAllowGroupScripts() const
{ return (mParcelFlags & PF_ALLOW_GROUP_SCRIPTS) ? TRUE : FALSE; }
diff --git a/indra/llinventory/llparcelflags.h b/indra/llinventory/llparcelflags.h
index 25b27a281a..4cffa83cc1 100644
--- a/indra/llinventory/llparcelflags.h
+++ b/indra/llinventory/llparcelflags.h
@@ -33,7 +33,7 @@ const U32 PF_ALLOW_FLY = 1 << 0;// Can start flying
const U32 PF_ALLOW_OTHER_SCRIPTS= 1 << 1;// Scripts by others can run.
const U32 PF_FOR_SALE = 1 << 2;// Can buy this land
const U32 PF_FOR_SALE_OBJECTS = 1 << 7;// Can buy all objects on this land
-const U32 PF_ALLOW_LANDMARK = 1 << 3;
+const U32 PF_ALLOW_LANDMARK = 1 << 3;// Always true/deprecated
const U32 PF_ALLOW_TERRAFORM = 1 << 4;
const U32 PF_ALLOW_DAMAGE = 1 << 5;
const U32 PF_CREATE_OBJECTS = 1 << 6;
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 8f01ad6c1c..e4ccd81faf 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -47,9 +47,6 @@
#elif (LL_LINUX && __GNUC__ <= 2)
#define llisnan(val) isnan(val)
#define llfinite(val) isfinite(val)
-#elif LL_SOLARIS
-#define llisnan(val) isnan(val)
-#define llfinite(val) (val <= std::numeric_limits<double>::max())
#else
#define llisnan(val) std::isnan(val)
#define llfinite(val) std::isfinite(val)
diff --git a/indra/llmath/llsdutil_math.cpp b/indra/llmath/llsdutil_math.cpp
index 591f7fde36..51e5e3764f 100644
--- a/indra/llmath/llsdutil_math.cpp
+++ b/indra/llmath/llsdutil_math.cpp
@@ -40,7 +40,7 @@
#if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h> // for htonl
-#elif LL_LINUX || LL_SOLARIS
+#elif LL_LINUX
# include <netinet/in.h>
#elif LL_DARWIN
# include <arpa/inet.h>
diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h
index 52dbf871db..e25a9ea7ef 100644
--- a/indra/llmessage/message.h
+++ b/indra/llmessage/message.h
@@ -35,10 +35,6 @@
#include <netinet/in.h>
#endif
-#if LL_SOLARIS
-#include <netinet/in.h>
-#endif
-
#if LL_WINDOWS
#include "winsock2.h" // htons etc.
#endif
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp
index a1bfc4edd9..a219ac1450 100644
--- a/indra/llprimitive/llmaterial.cpp
+++ b/indra/llprimitive/llmaterial.cpp
@@ -28,8 +28,6 @@
#include "llmaterial.h"
-#include "../llrender/llglheaders.h"
-
/**
* Materials cap parameters
*/
@@ -107,8 +105,6 @@ LLMaterial::LLMaterial()
, mSpecularLightExponent(LLMaterial::DEFAULT_SPECULAR_LIGHT_EXPONENT)
, mEnvironmentIntensity(LLMaterial::DEFAULT_ENV_INTENSITY)
, mDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
- , mDiffuseFormatPrimary(GL_RGBA)
- , mDiffuseBaked(false)
, mAlphaMaskCutoff(0)
{
}
@@ -315,20 +311,6 @@ void LLMaterial::setEnvironmentIntensity(U8 intensity)
mEnvironmentIntensity = intensity;
}
-U8 LLMaterial::getDiffuseAlphaModeRender() const
-{
- if (mDiffuseBaked
- || mDiffuseFormatPrimary == GL_RGBA
- || mDiffuseFormatPrimary == GL_ALPHA)
- {
- return mDiffuseAlphaMode;
- }
- else
- {
- return DIFFUSE_ALPHA_MODE_NONE;
- }
-}
-
U8 LLMaterial::getDiffuseAlphaMode() const
{
return mDiffuseAlphaMode;
@@ -339,26 +321,6 @@ void LLMaterial::setDiffuseAlphaMode(U8 alpha_mode)
mDiffuseAlphaMode = alpha_mode;
}
-U32 LLMaterial::getDiffuseFormatPrimary() const
-{
- return mDiffuseFormatPrimary;
-}
-
-void LLMaterial::setDiffuseFormatPrimary(U32 format_primary)
-{
- mDiffuseFormatPrimary = format_primary;
-}
-
-bool LLMaterial::getIsDiffuseBaked() const
-{
- return mDiffuseBaked;
-}
-
-void LLMaterial::setDiffuseBaked(bool baked)
-{
- mDiffuseBaked = baked;
-}
-
U8 LLMaterial::getAlphaMaskCutoff() const
{
return mAlphaMaskCutoff;
@@ -475,7 +437,7 @@ U32 LLMaterial::getShaderMask(U32 alpha_mode)
}
else
{
- ret = getDiffuseAlphaModeRender();
+ ret = getDiffuseAlphaMode();
}
llassert(ret < SHADER_COUNT);
diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h
index 1207917568..d58b7ee812 100644
--- a/indra/llprimitive/llmaterial.h
+++ b/indra/llprimitive/llmaterial.h
@@ -115,17 +115,8 @@ public:
void setSpecularLightExponent(U8 exponent);
U8 getEnvironmentIntensity() const;
void setEnvironmentIntensity(U8 intensity);
-
- // getDiffuseAlphaModeRender takes into account if image supports alpha
- // and returns value apropriate for render
- // getDiffuseAlphaMode() returns value as is
- U8 getDiffuseAlphaModeRender() const;
U8 getDiffuseAlphaMode() const;
void setDiffuseAlphaMode(U8 alpha_mode);
- U32 getDiffuseFormatPrimary() const;
- void setDiffuseFormatPrimary(U32 format_primary);
- bool getIsDiffuseBaked() const;
- void setDiffuseBaked(bool baked);
U8 getAlphaMaskCutoff() const;
void setAlphaMaskCutoff(U8 cutoff);
@@ -156,8 +147,6 @@ protected:
U8 mSpecularLightExponent;
U8 mEnvironmentIntensity;
U8 mDiffuseAlphaMode;
- U32 mDiffuseFormatPrimary; // value from texture, LLGLenum, is not included in fromLLSD/asLLSD
- bool mDiffuseBaked; // is not included in fromLLSD/asLLSD
U8 mAlphaMaskCutoff;
};
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index ee02a90b54..43fedeca64 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -151,7 +151,7 @@ LLMatrix4 gGLObliqueProjectionInverse;
std::list<LLGLUpdate*> LLGLUpdate::sGLQ;
-#if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS
+#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS
// ATI prototypes
#if LL_WINDOWS
@@ -328,7 +328,7 @@ PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL;
#endif
// vertex shader prototypes
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB = NULL;
PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB = NULL;
PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB = NULL;
@@ -347,7 +347,7 @@ PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB = NULL;
PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB = NULL;
PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB = NULL;
PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB = NULL;
-#endif // LL_LINUX || LL_SOLARIS
+#endif // LL_LINUX
PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB = NULL;
PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB = NULL;
PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB = NULL;
@@ -355,7 +355,7 @@ PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB = NULL;
PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB = NULL;
PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB = NULL;
PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB = NULL;
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB = NULL;
PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB = NULL;
PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB = NULL;
@@ -393,7 +393,7 @@ PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB = NULL;
PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB = NULL;
PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB = NULL;
PFNGLISPROGRAMARBPROC glIsProgramARB = NULL;
-#endif // LL_LINUX || LL_SOLARIS
+#endif // LL_LINUX
PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB = NULL;
PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB = NULL;
PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB = NULL;
@@ -471,8 +471,6 @@ LLGLManager::LLGLManager() :
mHasSeparateSpecularColor(FALSE),
- mDebugGPU(FALSE),
-
mDriverVersionMajor(1),
mDriverVersionMinor(0),
mDriverVersionRelease(0),
@@ -854,10 +852,6 @@ bool LLGLManager::initGL()
stop_glerror();
- setToDebugGPU();
-
- stop_glerror();
-
initGLStates();
stop_glerror();
@@ -865,17 +859,6 @@ bool LLGLManager::initGL()
return true;
}
-void LLGLManager::setToDebugGPU()
-{
- //"MOBILE INTEL(R) 965 EXPRESS CHIP",
- if (mGLRenderer.find("INTEL") != std::string::npos && mGLRenderer.find("965") != std::string::npos)
- {
- mDebugGPU = TRUE ;
- }
-
- return ;
-}
-
void LLGLManager::getGLInfo(LLSD& info)
{
if (gHeadlessClient)
@@ -1032,7 +1015,6 @@ void LLGLManager::asLLSD(LLSD& info)
// Other fields
info["has_requirements"] = mHasRequirements;
info["has_separate_specular_color"] = mHasSeparateSpecularColor;
- info["debug_gpu"] = mDebugGPU;
info["max_vertex_range"] = mGLMaxVertexRange;
info["max_index_range"] = mGLMaxIndexRange;
info["max_texture_size"] = mGLMaxTextureSize;
@@ -1167,7 +1149,7 @@ void LLGLManager::initExtensions()
mHasFragmentShader = ExtensionExists("GL_ARB_fragment_shader", gGLHExts.mSysExts) && (LLRender::sGLCoreProfile || ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts));
#endif
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
LL_INFOS() << "initExtensions() checking shell variables to adjust features..." << LL_ENDL;
// Our extension support for the Linux Client is very young with some
// potential driver gotchas, so offer a semi-secret way to turn it off.
@@ -1237,7 +1219,7 @@ void LLGLManager::initExtensions()
if (strchr(blacklist,'u')) mHasDepthClamp = FALSE;
}
-#endif // LL_LINUX || LL_SOLARIS
+#endif // LL_LINUX
if (!mHasMultitexture)
{
@@ -1315,7 +1297,7 @@ void LLGLManager::initExtensions()
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*) &mGLMaxTextureSize);
-#if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS
+#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS
LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL;
if (mHasVertexBufferObject)
{
@@ -1414,7 +1396,7 @@ void LLGLManager::initExtensions()
glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageCallbackARB");
glGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetDebugMessageLogARB");
}
-#if (!LL_LINUX && !LL_SOLARIS) || LL_LINUX_NV_GL_HEADERS
+#if (!LL_LINUX) || LL_LINUX_NV_GL_HEADERS
// This is expected to be a static symbol on Linux GL implementations, except if we use the nvidia headers - bah
glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElements");
if (!glDrawRangeElements)
@@ -2775,8 +2757,9 @@ LLGLSPipelineBlendSkyBox::LLGLSPipelineBlendSkyBox(bool depth_test, bool depth_w
#if LL_WINDOWS
// Expose desired use of high-performance graphics processor to Optimus driver and to AMD driver
+// https://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm
extern "C"
-{
+{
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 966c4b3c77..a07e2d9bb0 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -142,9 +142,6 @@ public:
// Misc extensions
BOOL mHasSeparateSpecularColor;
- //whether this GPU is in the debug list.
- BOOL mDebugGPU;
-
S32 mDriverVersionMajor;
S32 mDriverVersionMinor;
S32 mDriverVersionRelease;
@@ -178,7 +175,6 @@ private:
void initExtensions();
void initGLStates();
void initGLImages();
- void setToDebugGPU();
};
extern LLGLManager gGLManager;
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index 36fbb381bb..6bca3623e0 100644
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
@@ -27,242 +27,7 @@
#ifndef LL_LLGLHEADERS_H
#define LL_LLGLHEADERS_H
-#if LL_SOLARIS
-# if defined(__sparc)
-# define I_NEED_OS2_H // avoiding BOOL conflicts
-# endif
-# include "GL/gl.h"
-# if defined(__sparc)
-# undef I_NEED_OS2_H
-# ifdef BOOL
-# undef BOOL // now get rid of Xmd.h crap
-# endif
-# endif
-# include "GL/glx.h"
-# define GL_GLEXT_PROTOTYPES 1
-# include "GL/glext.h"
-# include "GL/glu.h"
-# include "GL/glx.h"
-# define GLX_GLXEXT_PROTOTYPES 1
-# include "GL/glxext.h"
-//# define GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddressARB((const GLubyte*)(p))
-# define GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddress((const GLubyte*)(p))
-
-// The __APPLE__ kludge is to make glh_extensions.h not symbol-clash horribly
-// This header is distributed with SL. You'll find it in linden/libraries/include/GL/
-# define __APPLE__
-# include "GL/glh_extensions.h"
-# undef __APPLE__
-
-
-// GL_ARB_vertex_buffer_object
-extern PFNGLBINDBUFFERARBPROC glBindBufferARB;
-extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB;
-extern PFNGLGENBUFFERSARBPROC glGenBuffersARB;
-extern PFNGLISBUFFERARBPROC glIsBufferARB;
-extern PFNGLBUFFERDATAARBPROC glBufferDataARB;
-extern PFNGLBUFFERSUBDATAARBPROC glBufferSubDataARB;
-extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB;
-extern PFNGLMAPBUFFERARBPROC glMapBufferARB;
-extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
-extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
-extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
-
-// GL_ARB_vertex_array_object
-extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
-extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
-extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
-extern PFNGLISVERTEXARRAYPROC glIsVertexArray;
-
-// GL_ARB_sync
-extern PFNGLFENCESYNCPROC glFenceSync;
-extern PFNGLISSYNCPROC glIsSync;
-extern PFNGLDELETESYNCPROC glDeleteSync;
-extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync;
-extern PFNGLWAITSYNCPROC glWaitSync;
-extern PFNGLGETINTEGER64VPROC glGetInteger64v;
-extern PFNGLGETSYNCIVPROC glGetSynciv;
-
-// GL_APPLE_flush_buffer_range
-extern PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE;
-extern PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE;
-
-// GL_ARB_map_buffer_range
-extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
-extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
-
-// GL_ATI_vertex_array_object
-extern PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI;
-extern PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI;
-extern PFNGLUPDATEOBJECTBUFFERATIPROC glUpdateObjectBufferATI;
-extern PFNGLGETOBJECTBUFFERFVATIPROC glGetObjectBufferfvATI;
-extern PFNGLGETOBJECTBUFFERIVATIPROC glGetObjectBufferivATI;
-extern PFNGLFREEOBJECTBUFFERATIPROC glFreeObjectBufferATI;
-extern PFNGLARRAYOBJECTATIPROC glArrayObjectATI;
-extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC glVertexAttribArrayObjectATI;
-extern PFNGLGETARRAYOBJECTFVATIPROC glGetArrayObjectfvATI;
-extern PFNGLGETARRAYOBJECTIVATIPROC glGetArrayObjectivATI;
-extern PFNGLVARIANTARRAYOBJECTATIPROC glVariantObjectArrayATI;
-extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC glGetVariantArrayObjectfvATI;
-extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC glGetVariantArrayObjectivATI;
-
-// GL_ARB_occlusion_query
-extern PFNGLGENQUERIESARBPROC glGenQueriesARB;
-extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB;
-extern PFNGLISQUERYARBPROC glIsQueryARB;
-extern PFNGLBEGINQUERYARBPROC glBeginQueryARB;
-extern PFNGLENDQUERYARBPROC glEndQueryARB;
-extern PFNGLGETQUERYIVARBPROC glGetQueryivARB;
-extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB;
-extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB;
-
-// GL_ARB_timer_query
-extern PFNGLQUERYCOUNTERPROC glQueryCounter;
-extern PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v;
-extern PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v;
-
-// GL_ARB_point_parameters
-extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB;
-extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB;
-
-// GL_ARB_shader_objects
-extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
-extern PFNGLGETHANDLEARBPROC glGetHandleARB;
-extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
-extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
-extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
-extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
-extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
-extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
-extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
-extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
-extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB;
-extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
-extern PFNGLUNIFORM2FARBPROC glUniform2fARB;
-extern PFNGLUNIFORM3FARBPROC glUniform3fARB;
-extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
-extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
-extern PFNGLUNIFORM2IARBPROC glUniform2iARB;
-extern PFNGLUNIFORM3IARBPROC glUniform3iARB;
-extern PFNGLUNIFORM4IARBPROC glUniform4iARB;
-extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB;
-extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB;
-extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB;
-extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB;
-extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB;
-extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB;
-extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
-extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
-extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
-extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
-extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv;
-extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
-extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
-extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
-extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
-extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB;
-extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
-extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB;
-extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB;
-extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB;
-extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB;
-
-// GL_ARB_vertex_shader
-extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB;
-extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB;
-extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB;
-extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB;
-extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB;
-extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB;
-extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB;
-extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB;
-extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB;
-extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB;
-extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB;
-extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB;
-extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB;
-extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB;
-extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB;
-extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB;
-extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB;
-extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB;
-extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB;
-extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB;
-extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB;
-extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB;
-extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB;
-extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB;
-extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB;
-extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB;
-extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB;
-extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB;
-extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB;
-extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
-extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB;
-extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB;
-extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB;
-extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB;
-extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB;
-extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB;
-extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
-extern PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer;
-extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
-extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
-extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB;
-extern PFNGLBINDPROGRAMARBPROC glBindProgramARB;
-extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB;
-extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB;
-extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB;
-extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB;
-extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB;
-extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB;
-extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB;
-extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB;
-extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB;
-extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB;
-extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB;
-extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB;
-extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB;
-extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB;
-extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB;
-extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB;
-extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB;
-extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB;
-extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB;
-extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB;
-extern PFNGLISPROGRAMARBPROC glIsProgramARB;
-extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
-extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB;
-extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
-
-extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB;
-extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC glGetCompressedTexImageARB;
-
-extern PFNGLCOLORTABLEEXTPROC glColorTableEXT;
-
-//GL_EXT_blend_func_separate
-extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT;
-
-//GL_EXT_framebuffer_object
-extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT;
-extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
-extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
-extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
-extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
-extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT;
-extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT;
-extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
-extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
-extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
-extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
-extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT;
-extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
-extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT;
-extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
-extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT;
-extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
-
-#elif LL_MESA
+#if LL_MESA
//----------------------------------------------------------------------------
// MESA headers
// quotes so we get libraries/.../GL/ version
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 384e5bf99f..4351f6e2c8 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -37,6 +37,10 @@
#include "OpenGL/OpenGL.h"
#endif
+// Print-print list of shader included source files that are linked together via glAttachObjectARB()
+// i.e. On macOS / OSX the AMD GLSL linker will display an error if a varying is left in an undefined state.
+#define DEBUG_SHADER_INCLUDES 0
+
// Lots of STL stuff in here, using namespace std to keep things more readable
using std::vector;
using std::pair;
@@ -392,16 +396,28 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
mLightHash = 0xFFFFFFFF;
llassert_always(!mShaderFiles.empty());
- BOOL success = TRUE;
// Create program
mProgramObject = glCreateProgramObjectARB();
+ if (mProgramObject == 0)
+ {
+ // Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist.
+ LL_SHADER_LOADING_WARNS() << "Failed to create handle for shader: " << mName << LL_ENDL;
+ unloadInternal();
+ return FALSE;
+ }
+
+ BOOL success = TRUE;
#if LL_DARWIN
// work-around missing mix(vec3,vec3,bvec3)
mDefines["OLD_SELECT"] = "1";
#endif
+#if DEBUG_SHADER_INCLUDES
+ fprintf(stderr, "--- %s ---\n", mName.c_str());
+#endif // DEBUG_SHADER_INCLUDES
+
//compile new source
vector< pair<string,GLenum> >::iterator fileIter = mShaderFiles.begin();
for ( ; fileIter != mShaderFiles.end(); fileIter++ )
@@ -485,11 +501,36 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
return success;
}
-BOOL LLGLSLShader::attachVertexObject(std::string object_path) {
+#if DEBUG_SHADER_INCLUDES
+void dumpAttachObject( const char *func_name, GLhandleARB program_object, const std::string &object_path )
+{
+ GLcharARB* info_log;
+ GLint info_len_expect = 0;
+ GLint info_len_actual = 0;
+
+ glGetObjectParameterivARB(program_object, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_len_expect);
+ fprintf(stderr, " * %-20s(), log size: %d, %s\n", func_name, info_len_expect, object_path.c_str());
+
+ if (info_len_expect > 0)
+ {
+ fprintf(stderr, " ========== %s() ========== \n", func_name);
+ info_log = new GLcharARB [ info_len_expect ];
+ glGetInfoLogARB(program_object, info_len_expect, &info_len_actual, info_log);
+ fprintf(stderr, "%s\n", info_log);
+ delete [] info_log;
+ }
+}
+#endif // DEBUG_SHADER_INCLUDES
+
+BOOL LLGLSLShader::attachVertexObject(std::string object_path)
+{
if (LLShaderMgr::instance()->mVertexShaderObjects.count(object_path) > 0)
{
stop_glerror();
glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mVertexShaderObjects[object_path]);
+#if DEBUG_SHADER_INCLUDES
+ dumpAttachObject("attachVertexObject", mProgramObject, object_path);
+#endif // DEBUG_SHADER_INCLUDES
stop_glerror();
return TRUE;
}
@@ -506,6 +547,9 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path)
{
stop_glerror();
glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mFragmentShaderObjects[object_path]);
+#if DEBUG_SHADER_INCLUDES
+ dumpAttachObject("attachFragmentObject", mProgramObject, object_path);
+#endif // DEBUG_SHADER_INCLUDES
stop_glerror();
return TRUE;
}
@@ -522,6 +566,10 @@ void LLGLSLShader::attachObject(GLhandleARB object)
{
stop_glerror();
glAttachObjectARB(mProgramObject, object);
+#if DEBUG_SHADER_INCLUDES
+ std::string object_path("???");
+ dumpAttachObject("attachObject", mProgramObject, object_path);
+#endif // DEBUG_SHADER_INCLUDES
stop_glerror();
}
else
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 11d9ef3f57..d515fc707a 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -871,10 +871,10 @@ void LLTexUnit::setTextureColorSpace(eTextureColorSpace space)
}
}
else
-#endif
{
glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT);
}
+#endif
}
LLLightState::LLLightState(S32 index)
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 236ebbd78f..e8c6295930 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -611,13 +611,11 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
#endif
GLenum error = GL_NO_ERROR;
- if (gDebugGL)
+
+ error = glGetError();
+ if (error != GL_NO_ERROR)
{
- error = glGetError();
- if (error != GL_NO_ERROR)
- {
- LL_SHADER_LOADING_WARNS() << "GL ERROR entering loadShaderFile(): " << error << LL_ENDL;
- }
+ LL_SHADER_LOADING_WARNS() << "GL ERROR entering loadShaderFile(): " << error << " for file: " << filename << LL_ENDL;
}
if (filename.empty())
@@ -966,55 +964,45 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
//create shader object
GLhandleARB ret = glCreateShaderObjectARB(type);
- if (gDebugGL)
+
+ error = glGetError();
+ if (error != GL_NO_ERROR)
{
- error = glGetError();
- if (error != GL_NO_ERROR)
- {
- LL_WARNS("ShaderLoading") << "GL ERROR in glCreateShaderObjectARB: " << error << LL_ENDL;
- }
+ LL_WARNS("ShaderLoading") << "GL ERROR in glCreateShaderObjectARB: " << error << " for file: " << open_file_name << LL_ENDL;
}
-
+
//load source
glShaderSourceARB(ret, shader_code_count, (const GLcharARB**) shader_code_text, NULL);
- if (gDebugGL)
+ error = glGetError();
+ if (error != GL_NO_ERROR)
{
- error = glGetError();
- if (error != GL_NO_ERROR)
- {
- LL_WARNS("ShaderLoading") << "GL ERROR in glShaderSourceARB: " << error << LL_ENDL;
- }
+ LL_WARNS("ShaderLoading") << "GL ERROR in glShaderSourceARB: " << error << " for file: " << open_file_name << LL_ENDL;
}
//compile source
glCompileShaderARB(ret);
- if (gDebugGL)
+ error = glGetError();
+ if (error != GL_NO_ERROR)
{
- error = glGetError();
- if (error != GL_NO_ERROR)
- {
- LL_WARNS("ShaderLoading") << "GL ERROR in glCompileShaderARB: " << error << LL_ENDL;
- }
+ LL_WARNS("ShaderLoading") << "GL ERROR in glCompileShaderARB: " << error << " for file: " << open_file_name << LL_ENDL;
}
-
+
if (error == GL_NO_ERROR)
{
//check for errors
GLint success = GL_TRUE;
glGetObjectParameterivARB(ret, GL_OBJECT_COMPILE_STATUS_ARB, &success);
- if (gDebugGL || success == GL_FALSE)
+
+ error = glGetError();
+ if (error != GL_NO_ERROR || success == GL_FALSE)
{
- error = glGetError();
- if (error != GL_NO_ERROR || success == GL_FALSE)
- {
- //an error occured, print log
- LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
- dumpObjectLog(ret, TRUE, open_file_name);
- dumpShaderSource(shader_code_count, shader_code_text);
- ret = 0;
- }
+ //an error occured, print log
+ LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
+ dumpObjectLog(ret, TRUE, open_file_name);
+ dumpShaderSource(shader_code_count, shader_code_text);
+ ret = 0;
}
}
else
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 127b5ce5b6..3908efd4ec 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -36,221 +36,223 @@ public:
LLShaderMgr();
virtual ~LLShaderMgr();
- typedef enum
- {
- MODELVIEW_MATRIX = 0,
- PROJECTION_MATRIX,
- INVERSE_PROJECTION_MATRIX,
- MODELVIEW_PROJECTION_MATRIX,
- INVERSE_MODELVIEW_MATRIX,
- NORMAL_MATRIX,
- TEXTURE_MATRIX0,
- TEXTURE_MATRIX1,
- TEXTURE_MATRIX2,
- TEXTURE_MATRIX3,
- OBJECT_PLANE_S,
- OBJECT_PLANE_T,
- VIEWPORT,
- LIGHT_POSITION,
- LIGHT_DIRECTION,
- LIGHT_ATTENUATION,
- LIGHT_DIFFUSE,
- LIGHT_AMBIENT,
- MULTI_LIGHT_COUNT,
- MULTI_LIGHT,
- MULTI_LIGHT_COL,
- MULTI_LIGHT_FAR_Z,
- PROJECTOR_MATRIX,
- PROJECTOR_NEAR,
- PROJECTOR_P,
- PROJECTOR_N,
- PROJECTOR_ORIGIN,
- PROJECTOR_RANGE,
- PROJECTOR_AMBIANCE,
- PROJECTOR_SHADOW_INDEX,
- PROJECTOR_SHADOW_FADE,
- PROJECTOR_FOCUS,
- PROJECTOR_LOD,
- PROJECTOR_AMBIENT_LOD,
- DIFFUSE_COLOR,
- DIFFUSE_MAP,
- ALTERNATE_DIFFUSE_MAP,
- SPECULAR_MAP,
- BUMP_MAP,
- BUMP_MAP2,
- ENVIRONMENT_MAP,
- CLOUD_NOISE_MAP,
- CLOUD_NOISE_MAP_NEXT,
- FULLBRIGHT,
- LIGHTNORM,
- SUNLIGHT_COLOR,
- AMBIENT,
- BLUE_HORIZON,
- BLUE_DENSITY,
- HAZE_HORIZON,
- HAZE_DENSITY,
- CLOUD_SHADOW,
- DENSITY_MULTIPLIER,
- DISTANCE_MULTIPLIER,
- MAX_Y,
- GLOW,
- CLOUD_COLOR,
- CLOUD_POS_DENSITY1,
- CLOUD_POS_DENSITY2,
- CLOUD_SCALE,
- GAMMA,
- SCENE_LIGHT_STRENGTH,
- LIGHT_CENTER,
- LIGHT_SIZE,
- LIGHT_FALLOFF,
- BOX_CENTER,
- BOX_SIZE,
-
- GLOW_MIN_LUMINANCE,
- GLOW_MAX_EXTRACT_ALPHA,
- GLOW_LUM_WEIGHTS,
- GLOW_WARMTH_WEIGHTS,
- GLOW_WARMTH_AMOUNT,
- GLOW_STRENGTH,
- GLOW_DELTA,
-
- MINIMUM_ALPHA,
- EMISSIVE_BRIGHTNESS,
-
- DEFERRED_SHADOW_MATRIX,
- DEFERRED_ENV_MAT,
- DEFERRED_SHADOW_CLIP,
- DEFERRED_SUN_WASH,
- DEFERRED_SHADOW_NOISE,
- DEFERRED_BLUR_SIZE,
- DEFERRED_SSAO_RADIUS,
- DEFERRED_SSAO_MAX_RADIUS,
- DEFERRED_SSAO_FACTOR,
- DEFERRED_SSAO_FACTOR_INV,
- DEFERRED_SSAO_EFFECT_MAT,
- DEFERRED_SCREEN_RES,
- DEFERRED_NEAR_CLIP,
- DEFERRED_SHADOW_OFFSET,
- DEFERRED_SHADOW_BIAS,
- DEFERRED_SPOT_SHADOW_BIAS,
- DEFERRED_SPOT_SHADOW_OFFSET,
- DEFERRED_SUN_DIR,
- DEFERRED_MOON_DIR,
- DEFERRED_SHADOW_RES,
- DEFERRED_PROJ_SHADOW_RES,
- DEFERRED_DEPTH_CUTOFF,
- DEFERRED_NORM_CUTOFF,
- DEFERRED_SHADOW_TARGET_WIDTH,
-
- FXAA_TC_SCALE,
- FXAA_RCP_SCREEN_RES,
- FXAA_RCP_FRAME_OPT,
- FXAA_RCP_FRAME_OPT2,
-
- DOF_FOCAL_DISTANCE,
- DOF_BLUR_CONSTANT,
- DOF_TAN_PIXEL_ANGLE,
- DOF_MAGNIFICATION,
- DOF_MAX_COF,
- DOF_RES_SCALE,
- DOF_WIDTH,
- DOF_HEIGHT,
-
- DEFERRED_DEPTH,
- DEFERRED_SHADOW0,
- DEFERRED_SHADOW1,
- DEFERRED_SHADOW2,
- DEFERRED_SHADOW3,
- DEFERRED_SHADOW4,
- DEFERRED_SHADOW5,
- DEFERRED_NORMAL,
- DEFERRED_POSITION,
- DEFERRED_DIFFUSE,
- DEFERRED_SPECULAR,
- DEFERRED_NOISE,
- DEFERRED_LIGHTFUNC,
- DEFERRED_LIGHT,
- DEFERRED_BLOOM,
- DEFERRED_PROJECTION,
- DEFERRED_NORM_MATRIX,
- TEXTURE_GAMMA,
- SPECULAR_COLOR,
- ENVIRONMENT_INTENSITY,
-
- AVATAR_MATRIX,
- AVATAR_TRANSLATION,
-
- WATER_SCREENTEX,
- WATER_SCREENDEPTH,
- WATER_REFTEX,
- WATER_EYEVEC,
- WATER_TIME,
- WATER_WAVE_DIR1,
- WATER_WAVE_DIR2,
- WATER_LIGHT_DIR,
- WATER_SPECULAR,
- WATER_SPECULAR_EXP,
- WATER_FOGCOLOR,
- WATER_FOGDENSITY,
- WATER_FOGKS,
- WATER_REFSCALE,
- WATER_WATERHEIGHT,
- WATER_WATERPLANE,
- WATER_NORM_SCALE,
- WATER_FRESNEL_SCALE,
- WATER_FRESNEL_OFFSET,
- WATER_BLUR_MULTIPLIER,
- WATER_SUN_ANGLE,
- WATER_SCALED_ANGLE,
- WATER_SUN_ANGLE2,
-
- WL_CAMPOSLOCAL,
-
- AVATAR_WIND,
- AVATAR_SINWAVE,
- AVATAR_GRAVITY,
-
- TERRAIN_DETAIL0,
- TERRAIN_DETAIL1,
- TERRAIN_DETAIL2,
- TERRAIN_DETAIL3,
- TERRAIN_ALPHARAMP,
-
- SHINY_ORIGIN,
- DISPLAY_GAMMA,
-
- INSCATTER_RT,
- SUN_SIZE,
- FOG_COLOR,
+ // clang-format off
+ typedef enum
+ { // Shader uniform name, set in LLShaderMgr::initAttribsAndUniforms()
+ MODELVIEW_MATRIX = 0, // "modelview_matrix"
+ PROJECTION_MATRIX, // "projection_matrix"
+ INVERSE_PROJECTION_MATRIX, // "inv_proj"
+ MODELVIEW_PROJECTION_MATRIX, // "modelview_projection_matrix"
+ INVERSE_MODELVIEW_MATRIX, // "inv_modelview"
+ NORMAL_MATRIX, // "normal_matrix"
+ TEXTURE_MATRIX0, // "texture_matrix0"
+ TEXTURE_MATRIX1, // "texture_matrix1"
+ TEXTURE_MATRIX2, // "texture_matrix2"
+ TEXTURE_MATRIX3, // "texture_matrix3"
+ OBJECT_PLANE_S, // "object_plane_s"
+ OBJECT_PLANE_T, // "object_plane_t"
+ VIEWPORT, // "viewport"
+ LIGHT_POSITION, // "light_position"
+ LIGHT_DIRECTION, // "light_direction"
+ LIGHT_ATTENUATION, // "light_attenuation"
+ LIGHT_DIFFUSE, // "light_diffuse"
+ LIGHT_AMBIENT, // "light_ambient"
+ MULTI_LIGHT_COUNT, // "light_count"
+ MULTI_LIGHT, // "light"
+ MULTI_LIGHT_COL, // "light_col"
+ MULTI_LIGHT_FAR_Z, // "far_z"
+ PROJECTOR_MATRIX, // "proj_mat"
+ PROJECTOR_NEAR, // "proj_near"
+ PROJECTOR_P, // "proj_p"
+ PROJECTOR_N, // "proj_n"
+ PROJECTOR_ORIGIN, // "proj_origin"
+ PROJECTOR_RANGE, // "proj_range"
+ PROJECTOR_AMBIANCE, // "proj_ambiance"
+ PROJECTOR_SHADOW_INDEX, // "proj_shadow_idx"
+ PROJECTOR_SHADOW_FADE, // "shadow_fade"
+ PROJECTOR_FOCUS, // "proj_focus"
+ PROJECTOR_LOD, // "proj_lod"
+ PROJECTOR_AMBIENT_LOD, // "proj_ambient_lod"
+ DIFFUSE_COLOR, // "color"
+ DIFFUSE_MAP, // "diffuseMap"
+ ALTERNATE_DIFFUSE_MAP, // "altDiffuseMap"
+ SPECULAR_MAP, // "specularMap"
+ BUMP_MAP, // "bumpMap"
+ BUMP_MAP2, // "bumpMap2"
+ ENVIRONMENT_MAP, // "environmentMap"
+ CLOUD_NOISE_MAP, // "cloud_noise_texture"
+ CLOUD_NOISE_MAP_NEXT, // "cloud_noise_texture_next"
+ FULLBRIGHT, // "fullbright"
+ LIGHTNORM, // "lightnorm"
+ SUNLIGHT_COLOR, // "sunlight_color"
+ AMBIENT, // "ambient_color"
+ BLUE_HORIZON, // "blue_horizon"
+ BLUE_DENSITY, // "blue_density"
+ HAZE_HORIZON, // "haze_horizon"
+ HAZE_DENSITY, // "haze_density"
+ CLOUD_SHADOW, // "cloud_shadow"
+ DENSITY_MULTIPLIER, // "density_multiplier"
+ DISTANCE_MULTIPLIER, // "distance_multiplier"
+ MAX_Y, // "max_y"
+ GLOW, // "glow"
+ CLOUD_COLOR, // "cloud_color"
+ CLOUD_POS_DENSITY1, // "cloud_pos_density1"
+ CLOUD_POS_DENSITY2, // "cloud_pos_density2"
+ CLOUD_SCALE, // "cloud_scale"
+ GAMMA, // "gamma"
+ SCENE_LIGHT_STRENGTH, // "scene_light_strength"
+ LIGHT_CENTER, // "center"
+ LIGHT_SIZE, // "size"
+ LIGHT_FALLOFF, // "falloff"
+ BOX_CENTER, // "box_center"
+ BOX_SIZE, // "box_size"
+
+ GLOW_MIN_LUMINANCE, // "minLuminance"
+ GLOW_MAX_EXTRACT_ALPHA, // "maxExtractAlpha"
+ GLOW_LUM_WEIGHTS, // "lumWeights"
+ GLOW_WARMTH_WEIGHTS, // "warmthWeights"
+ GLOW_WARMTH_AMOUNT, // "warmthAmount"
+ GLOW_STRENGTH, // "glowStrength"
+ GLOW_DELTA, // "glowDelta"
+
+ MINIMUM_ALPHA, // "minimum_alpha"
+ EMISSIVE_BRIGHTNESS, // "emissive_brightness"
+
+ DEFERRED_SHADOW_MATRIX, // "shadow_matrix"
+ DEFERRED_ENV_MAT, // "env_mat"
+ DEFERRED_SHADOW_CLIP, // "shadow_clip"
+ DEFERRED_SUN_WASH, // "sun_wash"
+ DEFERRED_SHADOW_NOISE, // "shadow_noise"
+ DEFERRED_BLUR_SIZE, // "blur_size"
+ DEFERRED_SSAO_RADIUS, // "ssao_radius"
+ DEFERRED_SSAO_MAX_RADIUS, // "ssao_max_radius"
+ DEFERRED_SSAO_FACTOR, // "ssao_factor"
+ DEFERRED_SSAO_FACTOR_INV, // "ssao_factor_inv"
+ DEFERRED_SSAO_EFFECT_MAT, // "ssao_effect_mat"
+ DEFERRED_SCREEN_RES, // "screen_res"
+ DEFERRED_NEAR_CLIP, // "near_clip"
+ DEFERRED_SHADOW_OFFSET, // "shadow_offset"
+ DEFERRED_SHADOW_BIAS, // "shadow_bias"
+ DEFERRED_SPOT_SHADOW_BIAS, // "spot_shadow_bias"
+ DEFERRED_SPOT_SHADOW_OFFSET, // "spot_shadow_offset"
+ DEFERRED_SUN_DIR, // "sun_dir"
+ DEFERRED_MOON_DIR, // "moon_dir"
+ DEFERRED_SHADOW_RES, // "shadow_res"
+ DEFERRED_PROJ_SHADOW_RES, // "proj_shadow_res"
+ DEFERRED_DEPTH_CUTOFF, // "depth_cutoff"
+ DEFERRED_NORM_CUTOFF, // "norm_cutoff"
+ DEFERRED_SHADOW_TARGET_WIDTH, // "shadow_target_width"
+
+ FXAA_TC_SCALE, // "tc_scale"
+ FXAA_RCP_SCREEN_RES, // "rcp_screen_res"
+ FXAA_RCP_FRAME_OPT, // "rcp_frame_opt"
+ FXAA_RCP_FRAME_OPT2, // "rcp_frame_opt2"
+
+ DOF_FOCAL_DISTANCE, // "focal_distance"
+ DOF_BLUR_CONSTANT, // "blur_constant"
+ DOF_TAN_PIXEL_ANGLE, // "tan_pixel_angle"
+ DOF_MAGNIFICATION, // "magnification"
+ DOF_MAX_COF, // "max_cof"
+ DOF_RES_SCALE, // "res_scale"
+ DOF_WIDTH, // "dof_width"
+ DOF_HEIGHT, // "dof_height"
+
+ DEFERRED_DEPTH, // "depthMap"
+ DEFERRED_SHADOW0, // "shadowMap0"
+ DEFERRED_SHADOW1, // "shadowMap1"
+ DEFERRED_SHADOW2, // "shadowMap2"
+ DEFERRED_SHADOW3, // "shadowMap3"
+ DEFERRED_SHADOW4, // "shadowMap4"
+ DEFERRED_SHADOW5, // "shadowMap5"
+ DEFERRED_NORMAL, // "normalMap"
+ DEFERRED_POSITION, // "positionMap"
+ DEFERRED_DIFFUSE, // "diffuseRect"
+ DEFERRED_SPECULAR, // "specularRect"
+ DEFERRED_NOISE, // "noiseMap"
+ DEFERRED_LIGHTFUNC, // "lightFunc"
+ DEFERRED_LIGHT, // "lightMap"
+ DEFERRED_BLOOM, // "bloomMap"
+ DEFERRED_PROJECTION, // "projectionMap"
+ DEFERRED_NORM_MATRIX, // "norm_mat"
+ TEXTURE_GAMMA, // "texture_gamma"
+ SPECULAR_COLOR, // "specular_color"
+ ENVIRONMENT_INTENSITY, // "env_intensity"
+
+ AVATAR_MATRIX, // "matrixPalette"
+ AVATAR_TRANSLATION, // "translationPalette"
+
+ WATER_SCREENTEX, // "screenTex"
+ WATER_SCREENDEPTH, // "screenDepth"
+ WATER_REFTEX, // "refTex"
+ WATER_EYEVEC, // "eyeVec"
+ WATER_TIME, // "time"
+ WATER_WAVE_DIR1, // "waveDir1"
+ WATER_WAVE_DIR2, // "waveDir2"
+ WATER_LIGHT_DIR, // "lightDir"
+ WATER_SPECULAR, // "specular"
+ WATER_SPECULAR_EXP, // "lightExp"
+ WATER_FOGCOLOR, // "waterFogColor"
+ WATER_FOGDENSITY, // "waterFogDensity"
+ WATER_FOGKS, // "waterFogKS"
+ WATER_REFSCALE, // "refScale"
+ WATER_WATERHEIGHT, // "waterHeight"
+ WATER_WATERPLANE, // "waterPlane"
+ WATER_NORM_SCALE, // "normScale"
+ WATER_FRESNEL_SCALE, // "fresnelScale"
+ WATER_FRESNEL_OFFSET, // "fresnelOffset"
+ WATER_BLUR_MULTIPLIER, // "blurMultiplier"
+ WATER_SUN_ANGLE, // "sunAngle"
+ WATER_SCALED_ANGLE, // "scaledAngle"
+ WATER_SUN_ANGLE2, // "sunAngle2"
+
+ WL_CAMPOSLOCAL, // "camPosLocal"
+
+ AVATAR_WIND, // "gWindDir"
+ AVATAR_SINWAVE, // "gSinWaveParams"
+ AVATAR_GRAVITY, // "gGravity"
+
+ TERRAIN_DETAIL0, // "detail_0"
+ TERRAIN_DETAIL1, // "detail_1"
+ TERRAIN_DETAIL2, // "detail_2"
+ TERRAIN_DETAIL3, // "detail_3"
+ TERRAIN_ALPHARAMP, // "alpha_ramp"
+
+ SHINY_ORIGIN, // "origin"
+ DISPLAY_GAMMA, // "display_gamma"
+
+ INSCATTER_RT, // "inscatter"
+ SUN_SIZE, // "sun_size"
+ FOG_COLOR, // "fog_color"
// precomputed textures
- TRANSMITTANCE_TEX,
- SCATTER_TEX,
- SINGLE_MIE_SCATTER_TEX,
- ILLUMINANCE_TEX,
- BLEND_FACTOR,
-
- NO_ATMO,
- MOISTURE_LEVEL,
- DROPLET_RADIUS,
- ICE_LEVEL,
- RAINBOW_MAP,
- HALO_MAP,
-
- MOON_BRIGHTNESS,
-
- CLOUD_VARIANCE,
-
- SH_INPUT_L1R,
- SH_INPUT_L1G,
- SH_INPUT_L1B,
-
- SUN_MOON_GLOW_FACTOR,
- WATER_EDGE_FACTOR,
- SUN_UP_FACTOR,
- MOONLIGHT_COLOR,
- END_RESERVED_UNIFORMS
- } eGLSLReservedUniforms;
+ TRANSMITTANCE_TEX, // "transmittance_texture"
+ SCATTER_TEX, // "scattering_texture"
+ SINGLE_MIE_SCATTER_TEX, // "single_mie_scattering_texture"
+ ILLUMINANCE_TEX, // "irradiance_texture"
+ BLEND_FACTOR, // "blend_factor"
+
+ NO_ATMO, // "no_atmo"
+ MOISTURE_LEVEL, // "moisture_level"
+ DROPLET_RADIUS, // "droplet_radius"
+ ICE_LEVEL, // "ice_level"
+ RAINBOW_MAP, // "rainbow_map"
+ HALO_MAP, // "halo_map"
+
+ MOON_BRIGHTNESS, // "moon_brightness"
+
+ CLOUD_VARIANCE, // "cloud_variance"
+
+ SH_INPUT_L1R, // "sh_input_r"
+ SH_INPUT_L1G, // "sh_input_g"
+ SH_INPUT_L1B, // "sh_input_b"
+
+ SUN_MOON_GLOW_FACTOR, // "sun_moon_glow_factor"
+ WATER_EDGE_FACTOR, // "water_edge"
+ SUN_UP_FACTOR, // "sun_up_factor"
+ MOONLIGHT_COLOR, // "moonlight_color"
+ END_RESERVED_UNIFORMS
+ } eGLSLReservedUniforms;
+ // clang-format on
// singleton pattern implementation
static LLShaderMgr * instance();
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 9867bd16d6..dbe1a3687f 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -155,9 +155,8 @@ public:
//get the size of a buffer with the given typemask and vertex count
//fill offsets with the offset of each vertex component array into the buffer
// indexed by the following enum
- static S32 calcOffsets(const U32& typemask, S32* offsets, S32 num_vertices);
+ static S32 calcOffsets(const U32& typemask, S32* offsets, S32 num_vertices);
-
//WARNING -- when updating these enums you MUST
// 1 - update LLVertexBuffer::sTypeSize
// 2 - add a strider accessor
@@ -165,24 +164,28 @@ public:
// 4 - modify LLVertexBuffer::setupClientArray
// 5 - modify LLViewerShaderMgr::mReservedAttribs
// 6 - update LLVertexBuffer::setupVertexArray
- enum {
- TYPE_VERTEX = 0,
- TYPE_NORMAL,
- TYPE_TEXCOORD0,
- TYPE_TEXCOORD1,
- TYPE_TEXCOORD2,
- TYPE_TEXCOORD3,
- TYPE_COLOR,
- TYPE_EMISSIVE,
- TYPE_TANGENT,
- TYPE_WEIGHT,
- TYPE_WEIGHT4,
- TYPE_CLOTHWEIGHT,
- TYPE_TEXTURE_INDEX,
- TYPE_MAX, // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer
- TYPE_INDEX, // TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer
- };
- enum {
+
+ // clang-format off
+ enum { // Shader attribute name, set in LLShaderMgr::initAttribsAndUniforms()
+ TYPE_VERTEX = 0, // "position"
+ TYPE_NORMAL, // "normal"
+ TYPE_TEXCOORD0, // "texcoord0"
+ TYPE_TEXCOORD1, // "texcoord1"
+ TYPE_TEXCOORD2, // "texcoord2"
+ TYPE_TEXCOORD3, // "texcoord3"
+ TYPE_COLOR, // "diffuse_color"
+ TYPE_EMISSIVE, // "emissive"
+ TYPE_TANGENT, // "tangent"
+ TYPE_WEIGHT, // "weight"
+ TYPE_WEIGHT4, // "weight4"
+ TYPE_CLOTHWEIGHT, // "clothing"
+ TYPE_TEXTURE_INDEX, // "texture_index"
+ TYPE_MAX, // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer
+ TYPE_INDEX, // TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer
+ };
+ // clang-format on
+
+ enum {
MAP_VERTEX = (1<<TYPE_VERTEX),
MAP_NORMAL = (1<<TYPE_NORMAL),
MAP_TEXCOORD0 = (1<<TYPE_TEXCOORD0),
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index cce618487b..f781ff4110 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -122,6 +122,7 @@ set(llui_SOURCE_FILES
lluictrl.cpp
lluictrlfactory.cpp
lluistring.cpp
+ lluiusage.cpp
llundo.cpp
llurlaction.cpp
llurlentry.cpp
@@ -241,6 +242,7 @@ set(llui_HEADER_FILES
llui.h
lluicolor.h
lluistring.h
+ lluiusage.h
llundo.h
llurlaction.h
llurlentry.h
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 9682c3bc10..0e59fdf519 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -47,6 +47,7 @@
#include "llnotificationsutil.h"
#include "llrender.h"
#include "lluictrlfactory.h"
+#include "lluiusage.h"
#include "llhelp.h"
#include "lldockablefloater.h"
#include "llviewereventrecorder.h"
@@ -437,6 +438,13 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
setFocus(TRUE);
}
+ if (!mFunctionName.empty())
+ {
+ LL_DEBUGS("UIUsage") << "calling mouse down function " << mFunctionName << LL_ENDL;
+ LLUIUsage::instance().logCommand(mFunctionName);
+ LLUIUsage::instance().logControl(getPathname());
+ }
+
/*
* ATTENTION! This call fires another mouse down callback.
* If you wish to remove this call emit that signal directly
diff --git a/indra/llui/llchat.h b/indra/llui/llchat.h
index f5b242fdfc..c39e44200c 100644
--- a/indra/llui/llchat.h
+++ b/indra/llui/llchat.h
@@ -37,7 +37,8 @@ typedef enum e_chat_source_type
CHAT_SOURCE_SYSTEM = 0,
CHAT_SOURCE_AGENT = 1,
CHAT_SOURCE_OBJECT = 2,
- CHAT_SOURCE_UNKNOWN = 3
+ CHAT_SOURCE_TELEPORT = 3,
+ CHAT_SOURCE_UNKNOWN = 4
} EChatSourceType;
typedef enum e_chat_type
@@ -64,7 +65,8 @@ typedef enum e_chat_style
{
CHAT_STYLE_NORMAL,
CHAT_STYLE_IRC,
- CHAT_STYLE_HISTORY
+ CHAT_STYLE_HISTORY,
+ CHAT_STYLE_TELEPORT_SEP
}EChatStyle;
// A piece of chat
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index e9c980ad9a..8ceb411ede 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -58,6 +58,7 @@
#include "llhelp.h"
#include "llmultifloater.h"
#include "llsdutil.h"
+#include "lluiusage.h"
#include <boost/foreach.hpp>
@@ -198,7 +199,9 @@ LLFloater::Params::Params()
help_pressed_image("help_pressed_image"),
open_callback("open_callback"),
close_callback("close_callback"),
- follows("follows")
+ follows("follows"),
+ rel_x("rel_x", 0),
+ rel_y("rel_y", 0)
{
changeDefault(visible, false);
}
@@ -267,6 +270,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mHasBeenDraggedWhileMinimized(FALSE),
mPreviousMinimizedBottom(0),
mPreviousMinimizedLeft(0),
+ mDefaultRelativeX(p.rel_x),
+ mDefaultRelativeY(p.rel_y),
mMinimizeSignal(NULL)
// mNotificationContext(NULL)
{
@@ -505,7 +510,12 @@ void LLFloater::destroy()
// virtual
LLFloater::~LLFloater()
{
- LLFloaterReg::removeInstance(mInstanceName, mKey);
+ if (!isDead())
+ {
+ // If it's dead, instance is supposed to be already removed, and
+ // in case of single instance we can remove new one by accident
+ LLFloaterReg::removeInstance(mInstanceName, mKey);
+ }
if( gFocusMgr.childHasKeyboardFocus(this))
{
@@ -934,6 +944,15 @@ bool LLFloater::applyRectControl()
saved_rect = true;
}
+ else if ((mDefaultRelativeX != 0) && (mDefaultRelativeY != 0))
+ {
+ mPosition.mX = mDefaultRelativeX;
+ mPosition.mY = mDefaultRelativeY;
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ applyRelativePosition();
+
+ saved_rect = true;
+ }
// remember updated position
if (rect_specified)
@@ -1631,6 +1650,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
// virtual
void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key)
{
+ LLUIUsage::instance().logFloater(getInstanceName());
LLMultiFloater* hostp = getHost();
if (hostp)
{
@@ -3198,6 +3218,9 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mSingleInstance = p.single_instance;
mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance;
+ mDefaultRelativeX = p.rel_x;
+ mDefaultRelativeY = p.rel_y;
+
mPositioning = p.positioning;
mSaveRect = p.save_rect;
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index f8c04e8a2f..2672d600c6 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -172,6 +172,9 @@ public:
Optional<S32> header_height,
legacy_header_height; // HACK see initFromXML()
+ Optional<F32> rel_x,
+ rel_y;
+
// Images for top-right controls
Optional<LLUIImage*> close_image,
restore_image,
@@ -521,6 +524,9 @@ private:
BOOL mHasBeenDraggedWhileMinimized;
S32 mPreviousMinimizedBottom;
S32 mPreviousMinimizedLeft;
+
+ F32 mDefaultRelativeX;
+ F32 mDefaultRelativeY;
};
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 85e07fc6a6..36a0cb0fd0 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -32,6 +32,7 @@
#include "llfloater.h"
#include "llmultifloater.h"
#include "llfloaterreglistener.h"
+#include "lluiusage.h"
//*******************************************************
@@ -57,6 +58,12 @@ void LLFloaterReg::add(const std::string& name, const std::string& filename, con
}
//static
+bool LLFloaterReg::isRegistered(const std::string& name)
+{
+ return sBuildMap.find(name) != sBuildMap.end();
+}
+
+//static
LLFloater* LLFloaterReg::getLastFloaterInGroup(const std::string& name)
{
const std::string& groupname = sGroupMap[name];
@@ -472,7 +479,6 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
std::string name = sdname.asString();
LLFloater* instance = getInstance(name, key);
-
if (!instance)
{
LL_DEBUGS() << "Unable to get instance of floater '" << name << "'" << LL_ENDL;
diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h
index e3b17dcb4f..a457a15673 100644
--- a/indra/llui/llfloaterreg.h
+++ b/indra/llui/llfloaterreg.h
@@ -85,6 +85,7 @@ public:
static void add(const std::string& name, const std::string& file, const LLFloaterBuildFunc& func,
const std::string& groupname = LLStringUtil::null);
+ static bool isRegistered(const std::string& name);
// Helpers
static LLFloater* getLastFloaterInGroup(const std::string& name);
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index aa5779d45f..f84625bea7 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -283,6 +283,9 @@ public:
void resetContextMenu() { setContextMenu(NULL); };
+ void setBgImage(LLPointer<LLUIImage> image) { mBgImage = image; }
+ void setBgImageFocused(LLPointer<LLUIImage> image) { mBgImageFocused = image; }
+
private:
// private helper methods
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 37dbe9b40e..cdaf03ebde 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -79,7 +79,7 @@ const U32 LEFT_PAD_PIXELS = 3;
const U32 LEFT_WIDTH_PIXELS = 15;
const U32 LEFT_PLAIN_PIXELS = LEFT_PAD_PIXELS + LEFT_WIDTH_PIXELS;
-const U32 RIGHT_PAD_PIXELS = 2;
+const U32 RIGHT_PAD_PIXELS = 7;
const U32 RIGHT_WIDTH_PIXELS = 15;
const U32 RIGHT_PLAIN_PIXELS = RIGHT_PAD_PIXELS + RIGHT_WIDTH_PIXELS;
@@ -95,7 +95,7 @@ const std::string SEPARATOR_NAME("separator");
const std::string VERTICAL_SEPARATOR_LABEL( "|" );
const std::string LLMenuGL::BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK
-const std::string LLMenuGL::BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
+const std::string LLMenuGL::BRANCH_SUFFIX( "\xe2\x96\xb8" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
const std::string LLMenuGL::ARROW_UP ("^^^^^^^");
const std::string LLMenuGL::ARROW_DOWN("vvvvvvv");
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 06ec648178..b791a19c2b 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -77,6 +77,7 @@ LLNotificationForm::FormButton::FormButton()
text("text"),
ignore("ignore"),
is_default("default"),
+ width("width", 0),
type("type")
{
// set type here so it gets serialized
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 2f4578da17..b0b56cf599 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -191,6 +191,7 @@ public:
Mandatory<std::string> text;
Optional<std::string> ignore;
Optional<bool> is_default;
+ Optional<S32> width;
Mandatory<std::string> type;
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp
index 6e924c1f19..d65c220974 100644
--- a/indra/llui/llresmgr.cpp
+++ b/indra/llui/llresmgr.cpp
@@ -295,9 +295,6 @@ const std::string LLLocale::SYSTEM_LOCALE("English_United States.1252");
#elif LL_DARWIN
const std::string LLLocale::USER_LOCALE("en_US.iso8859-1");// = LLStringUtil::null;
const std::string LLLocale::SYSTEM_LOCALE("en_US.iso8859-1");
-#elif LL_SOLARIS
-const std::string LLLocale::USER_LOCALE("en_US.ISO8859-1");
-const std::string LLLocale::SYSTEM_LOCALE("C");
#else // LL_LINUX likes this
const std::string LLLocale::USER_LOCALE("en_US.utf8");
const std::string LLLocale::SYSTEM_LOCALE("C");
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 1fdd05a11c..bafeef41fb 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -34,7 +34,11 @@
LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
: LLUICtrl(p),
mSearchButton(NULL),
- mClearButton(NULL)
+ mClearButton(NULL),
+ mEditorImage(p.background_image),
+ mEditorImageFocused(p.background_image_focused),
+ mEditorSearchImage(p.background_image_highlight),
+ mHighlightTextField(p.highlight_text_field)
{
S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height;
S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad;
@@ -57,6 +61,8 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
// Set up line editor.
LLLineEditor::Params line_editor_params(p);
line_editor_params.name("filter edit box");
+ line_editor_params.background_image(p.background_image);
+ line_editor_params.background_image_focused(p.background_image_focused);
line_editor_params.rect(getLocalRect());
line_editor_params.follows.flags(FOLLOWS_ALL);
line_editor_params.text_pad_left(text_pad_left);
@@ -104,6 +110,20 @@ void LLSearchEditor::draw()
if (mClearButton)
mClearButton->setVisible(!mSearchEditor->getWText().empty());
+ if (mHighlightTextField)
+ {
+ if (!mSearchEditor->getWText().empty())
+ {
+ mSearchEditor->setBgImage(mEditorSearchImage);
+ mSearchEditor->setBgImageFocused(mEditorSearchImage);
+ }
+ else
+ {
+ mSearchEditor->setBgImage(mEditorImage);
+ mSearchEditor->setBgImageFocused(mEditorImageFocused);
+ }
+ }
+
LLUICtrl::draw();
}
diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h
index 3b12868225..c0f3c1d60c 100644
--- a/indra/llui/llsearcheditor.h
+++ b/indra/llui/llsearcheditor.h
@@ -47,14 +47,23 @@ public:
Optional<LLButton::Params> search_button,
clear_button;
Optional<bool> search_button_visible,
- clear_button_visible;
+ clear_button_visible,
+ highlight_text_field;
Optional<commit_callback_t> keystroke_callback;
+ Optional<LLUIImage*> background_image,
+ background_image_focused,
+ background_image_highlight;
+
Params()
: search_button("search_button"),
search_button_visible("search_button_visible"),
clear_button("clear_button"),
- clear_button_visible("clear_button_visible")
+ clear_button_visible("clear_button_visible"),
+ highlight_text_field("highlight_text_field"),
+ background_image("background_image"),
+ background_image_focused("background_image_focused"),
+ background_image_highlight("background_image_highlight")
{}
};
@@ -93,6 +102,13 @@ protected:
LLLineEditor* mSearchEditor;
LLButton* mSearchButton;
LLButton* mClearButton;
+
+ LLPointer<LLUIImage> mEditorImage;
+ LLPointer<LLUIImage> mEditorImageFocused;
+ LLPointer<LLUIImage> mEditorSearchImage;
+ LLPointer<LLUIImage> mEditorSearchImageFocused;
+
+ bool mHighlightTextField;
};
#endif // LL_SEARCHEDITOR_H
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index e6b43da8e5..459fdcf2ae 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -38,6 +38,7 @@
#include "llrender.h"
#include "llfloater.h"
#include "lltrans.h"
+#include "lluiusage.h"
//----------------------------------------------------------------------------
@@ -1556,6 +1557,8 @@ BOOL LLTabContainer::setTab(S32 which)
if (is_selected)
{
+ LLUIUsage::instance().logPanel(tuple->mTabPanel->getName());
+
// Make sure selected tab is within scroll region
if (mIsVertical)
{
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index e6f466ec78..4868c66d1b 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -967,6 +967,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
executeStopParam.function_name = executeStopFunction;
executeStopParam.parameter = commandp->executeStopParameters();
LLUICtrl::commit_callback_t execute_func = initCommitCallback(executeParam);
+ button->setFunctionName(commandp->executeFunctionName());
+ LL_DEBUGS("UIUsage") << "button function name a -> " << commandp->executeFunctionName() << LL_ENDL;
LLUICtrl::commit_callback_t stop_func = initCommitCallback(executeStopParam);
button->setMouseDownCallback(boost::bind(&LLToolBarButton::callIfEnabled, button, execute_func, _1, _2));
@@ -974,6 +976,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
}
else
{
+ button->setFunctionName(commandp->executeFunctionName());
+ LL_DEBUGS("UIUsage") << "button function name b -> " << commandp->executeFunctionName() << LL_ENDL;
button->setCommitCallback(executeParam);
}
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 544a76e8d5..5924542a19 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -35,6 +35,7 @@
#include "lluictrlfactory.h"
#include "lltabcontainer.h"
#include "llaccordionctrltab.h"
+#include "lluiusage.h"
static LLDefaultChildRegistry::Register<LLUICtrl> r("ui_ctrl");
@@ -282,6 +283,7 @@ LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCa
else
{
std::string function_name = cb.function_name;
+ setFunctionName(function_name);
commit_callback_t* func = (CommitCallbackRegistry::getValue(function_name));
if (func)
{
@@ -422,7 +424,19 @@ BOOL LLUICtrl::canFocusChildren() const
void LLUICtrl::onCommit()
{
if (mCommitSignal)
- (*mCommitSignal)(this, getValue());
+ {
+ if (!mFunctionName.empty())
+ {
+ LL_DEBUGS("UIUsage") << "calling commit function " << mFunctionName << LL_ENDL;
+ LLUIUsage::instance().logCommand(mFunctionName);
+ LLUIUsage::instance().logControl(getPathname());
+ }
+ else
+ {
+ //LL_DEBUGS("UIUsage") << "calling commit function " << "UNKNOWN" << LL_ENDL;
+ }
+ (*mCommitSignal)(this, getValue());
+ }
}
//virtual
@@ -597,6 +611,12 @@ void LLUICtrl::setMakeInvisibleControlVariable(LLControlVariable* control)
setVisible(!(mMakeInvisibleControlVariable->getValue().asBoolean()));
}
}
+
+void LLUICtrl::setFunctionName(const std::string& function_name)
+{
+ mFunctionName = function_name;
+}
+
// static
bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type)
{
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index 7360bd7659..67dd24341c 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -183,6 +183,8 @@ public:
void setMakeVisibleControlVariable(LLControlVariable* control);
void setMakeInvisibleControlVariable(LLControlVariable* control);
+ void setFunctionName(const std::string& function_name);
+
virtual void setTentative(BOOL b);
virtual BOOL getTentative() const;
virtual void setValue(const LLSD& value);
@@ -310,6 +312,8 @@ protected:
LLControlVariable* mMakeInvisibleControlVariable;
boost::signals2::connection mMakeInvisibleControlConnection;
+ std::string mFunctionName;
+
static F32 sActiveControlTransparency;
static F32 sInactiveControlTransparency;
diff --git a/indra/llui/lluiusage.cpp b/indra/llui/lluiusage.cpp
new file mode 100644
index 0000000000..ccae6643b9
--- /dev/null
+++ b/indra/llui/lluiusage.cpp
@@ -0,0 +1,146 @@
+/**
+* @file lluiuisage.cpp
+* @brief Source file for LLUIUsage
+*
+* $LicenseInfo:firstyear=2021&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2021, 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 "linden_common.h"
+#include "lluiusage.h"
+#include <boost/algorithm/string.hpp>
+
+LLUIUsage::LLUIUsage()
+{
+}
+
+LLUIUsage::~LLUIUsage()
+{
+}
+
+// static
+std::string LLUIUsage::sanitized(const std::string& s)
+{
+ // Remove characters that make the ViewerStats db unhappy
+ std::string result(s);
+ std::replace(result.begin(), result.end(), '.', '_');
+ std::replace(result.begin(), result.end(), ' ', '_');
+ return result;
+}
+
+// static
+void LLUIUsage::setLLSDPath(LLSD& sd, const std::string& path, S32 max_elts, const LLSD& val)
+{
+ // Keep the last max_elts components of the specified path
+ std::vector<std::string> fields;
+ boost::split(fields, path, boost::is_any_of("/"));
+ auto first_pos = std::max(fields.begin(), fields.end() - max_elts);
+ auto end_pos = fields.end();
+ std::vector<std::string> last_fields(first_pos,end_pos);
+
+ setLLSDNested(sd, last_fields, val);
+}
+
+// setLLSDNested()
+// Accomplish the equivalent of
+// sd[fields[0]][fields[1]]... = val;
+// for an arbitrary number of fields.
+// This might be useful as an LLSD utility function; is not specific to LLUIUsage
+//
+// static
+void LLUIUsage::setLLSDNested(LLSD& sd, const std::vector<std::string>& fields, const LLSD& val)
+{
+ LLSD* fsd = &sd;
+ for (auto it=fields.begin(); it!=fields.end(); ++it)
+ {
+ if (it == fields.end()-1)
+ {
+ (*fsd)[*it] = val;
+ }
+ else
+ {
+ if (!(*fsd)[*it].isMap())
+ {
+ (*fsd)[*it] = LLSD::emptyMap();
+ }
+ fsd = &(*fsd)[*it];
+ }
+ }
+}
+
+void LLUIUsage::logCommand(const std::string& command)
+{
+ mCommandCounts[sanitized(command)]++;
+ LL_DEBUGS("UIUsage") << "command " << command << LL_ENDL;
+}
+
+void LLUIUsage::logControl(const std::string& control)
+{
+ mControlCounts[sanitized(control)]++;
+ LL_DEBUGS("UIUsage") << "control " << control << LL_ENDL;
+}
+
+
+void LLUIUsage::logFloater(const std::string& floater)
+{
+ mFloaterCounts[sanitized(floater)]++;
+ LL_DEBUGS("UIUsage") << "floater " << floater << LL_ENDL;
+}
+
+void LLUIUsage::logPanel(const std::string& p)
+{
+ mPanelCounts[sanitized(p)]++;
+ LL_DEBUGS("UIUsage") << "panel " << p << LL_ENDL;
+}
+
+LLSD LLUIUsage::asLLSD() const
+{
+ LLSD result;
+ for (auto const& it : mCommandCounts)
+ {
+ result["commands"][it.first] = LLSD::Integer(it.second);
+ }
+ for (auto const& it : mControlCounts)
+ {
+ setLLSDPath(result["controls"], it.first, 2, LLSD::Integer(it.second));
+ }
+ for (auto const& it : mFloaterCounts)
+ {
+ result["floaters"][it.first] = LLSD::Integer(it.second);
+ }
+ for (auto const& it : mPanelCounts)
+ {
+ result["panels"][it.first] = LLSD::Integer(it.second);
+ }
+ return result;
+}
+
+// Clear up some junk content generated during initial login/UI initialization
+void LLUIUsage::clear()
+{
+
+ LL_DEBUGS("UIUsage") << "clear" << LL_ENDL;
+ mCommandCounts.clear();
+ mControlCounts.clear();
+ mFloaterCounts.clear();
+ mPanelCounts.clear();
+}
+
diff --git a/indra/llui/lluiusage.h b/indra/llui/lluiusage.h
new file mode 100644
index 0000000000..a30cd80db3
--- /dev/null
+++ b/indra/llui/lluiusage.h
@@ -0,0 +1,57 @@
+/**
+* @file lluiuisage.h
+* @brief Header file for LLUIUsage
+*
+* $LicenseInfo:firstyear=2021&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2021, 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_LLUIUSAGE_H
+#define LL_LLUIUSAGE_H
+
+#include <map>
+#include "llsd.h"
+#include "llsingleton.h"
+
+// UIUsage tracking to see which operations and UI elements are most popular in a session
+class LLUIUsage : public LLSingleton<LLUIUsage>
+{
+public:
+ LLSINGLETON(LLUIUsage);
+ ~LLUIUsage();
+public:
+ static std::string sanitized(const std::string& s);
+ static void setLLSDPath(LLSD& sd, const std::string& path, S32 max_elts, const LLSD& val);
+ static void setLLSDNested(LLSD& sd, const std::vector<std::string>& fields, const LLSD& val);
+ void logCommand(const std::string& command);
+ void logControl(const std::string& control);
+ void logFloater(const std::string& floater);
+ void logPanel(const std::string& p);
+ LLSD asLLSD() const;
+ void clear();
+private:
+ std::map<std::string,U32> mCommandCounts;
+ std::map<std::string,U32> mControlCounts;
+ std::map<std::string,U32> mFloaterCounts;
+ std::map<std::string,U32> mPanelCounts;
+};
+
+#endif // LLUIUIUSAGE.h
diff --git a/indra/llui/llvirtualtrackball.cpp b/indra/llui/llvirtualtrackball.cpp
index 723643dd25..6e0aef740d 100644
--- a/indra/llui/llvirtualtrackball.cpp
+++ b/indra/llui/llvirtualtrackball.cpp
@@ -348,6 +348,42 @@ LLQuaternion LLVirtualTrackball::getRotation() const
return mValue;
}
+// static
+void LLVirtualTrackball::getAzimuthAndElevation(const LLQuaternion &quat, F32 &azimuth, F32 &elevation)
+{
+ // LLQuaternion has own function to get azimuth, but it doesn't appear to return correct values (meant for 2d?)
+ LLVector3 point = VectorZero * quat;
+
+ if (!is_approx_zero(point.mV[VX]) || !is_approx_zero(point.mV[VY]))
+ {
+ azimuth = atan2f(point.mV[VX], point.mV[VY]);
+ }
+ else
+ {
+ azimuth = 0;
+ }
+
+ azimuth -= F_PI_BY_TWO;
+
+ if (azimuth < 0)
+ {
+ azimuth += F_PI * 2;
+ }
+
+ // while vector is '1', F32 is not sufficiently precise and we can get
+ // values like 1.0000012 which will result in -90deg angle instead of 90deg
+ F32 z = llclamp(point.mV[VZ], -1.f, 1.f);
+ elevation = asin(z); // because VectorZero's length is '1'
+}
+
+// static
+void LLVirtualTrackball::getAzimuthAndElevationDeg(const LLQuaternion &quat, F32 &azimuth, F32 &elevation)
+{
+ getAzimuthAndElevation(quat, azimuth, elevation);
+ azimuth *= RAD_TO_DEG;
+ elevation *= RAD_TO_DEG;
+}
+
BOOL LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
@@ -409,6 +445,10 @@ BOOL LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
mValue *= az_quat;
}
+ // we are doing a lot of F32 mathematical operations with loss of precision,
+ // re-normalize to compensate
+ mValue.normalize();
+
mPrevX = x;
mPrevY = y;
onCommit();
diff --git a/indra/llui/llvirtualtrackball.h b/indra/llui/llvirtualtrackball.h
index 2d4b1ece17..c7a893877b 100644
--- a/indra/llui/llvirtualtrackball.h
+++ b/indra/llui/llvirtualtrackball.h
@@ -96,6 +96,9 @@ public:
void setRotation(const LLQuaternion &value);
LLQuaternion getRotation() const;
+ static void getAzimuthAndElevation(const LLQuaternion &quat, F32 &azimuth, F32 &elevation);
+ static void getAzimuthAndElevationDeg(const LLQuaternion &quat, F32 &azimuth, F32 &elevation);
+
protected:
friend class LLUICtrlFactory;
LLVirtualTrackball(const Params&);
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 10fbc06c61..9e9abbadff 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -61,9 +61,6 @@ LLDir_Win32 gDirUtil;
#elif LL_DARWIN
#include "lldir_mac.h"
LLDir_Mac gDirUtil;
-#elif LL_SOLARIS
-#include "lldir_solaris.h"
-LLDir_Solaris gDirUtil;
#else
#include "lldir_linux.h"
LLDir_Linux gDirUtil;
diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h
index 38e204ef04..4988b9c6e3 100644
--- a/indra/llvfs/lldir.h
+++ b/indra/llvfs/lldir.h
@@ -27,11 +27,6 @@
#ifndef LL_LLDIR_H
#define LL_LLDIR_H
-#if LL_SOLARIS
-#include <sys/param.h>
-#define MAX_PATH MAXPATHLEN
-#endif
-
// these numbers are read from settings_files.xml, so we need to be explicit
typedef enum ELLPath
{
diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp
deleted file mode 100644
index f18560ff20..0000000000
--- a/indra/llvfs/lldir_solaris.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-/**
- * @file fmodwrapper.cpp
- * @brief dummy source file for building a shared library to wrap libfmod.a
- *
- * $LicenseInfo:firstyear=2005&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 "linden_common.h"
-
-#include "lldir_solaris.h"
-#include "llerror.h"
-#include "llrand.h"
-#include "llstring.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <glob.h>
-#include <pwd.h>
-#include <sys/utsname.h>
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
-#include <fcntl.h>
-
-static std::string getCurrentUserHome(char* fallback)
-{
- // fwiw this exactly duplicates getCurrentUserHome() in lldir_linux.cpp...
- // we should either derive both from LLDir_Posix or just axe Solaris.
- const uid_t uid = getuid();
- struct passwd *pw;
-
- pw = getpwuid(uid);
- if ((pw != NULL) && (pw->pw_dir != NULL))
- {
- return pw->pw_dir;
- }
-
- LL_INFOS() << "Couldn't detect home directory from passwd - trying $HOME" << LL_ENDL;
- auto home_env = LLStringUtil::getoptenv("HOME");
- if (home_env)
- {
- return *home_env;
- }
- else
- {
- LL_WARNS() << "Couldn't detect home directory! Falling back to " << fallback << LL_ENDL;
- return fallback;
- }
-}
-
-
-LLDir_Solaris::LLDir_Solaris()
-{
- mDirDelimiter = "/";
- mCurrentDirIndex = -1;
- mCurrentDirCount = -1;
- mDirp = NULL;
-
- char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */
- if (getcwd(tmp_str, LL_MAX_PATH) == NULL)
- {
- strcpy(tmp_str, "/tmp");
- LL_WARNS() << "Could not get current directory; changing to "
- << tmp_str << LL_ENDL;
- if (chdir(tmp_str) == -1)
- {
- LL_ERRS() << "Could not change directory to " << tmp_str << LL_ENDL;
- }
- }
-
- mExecutableFilename = "";
- mExecutablePathAndName = "";
- mExecutableDir = strdup(tmp_str);
- mWorkingDir = strdup(tmp_str);
- mAppRODataDir = strdup(tmp_str);
- mOSUserDir = getCurrentUserHome(tmp_str);
- mOSUserAppDir = "";
- mLindenUserDir = "";
-
- char path [LL_MAX_PATH]; /* Flawfinder: ignore */
-
- sprintf(path, "/proc/%d/psinfo", (int)getpid());
- int proc_fd = -1;
- if((proc_fd = open(path, O_RDONLY)) == -1){
- LL_WARNS() << "unable to open " << path << LL_ENDL;
- return;
- }
- psinfo_t proc_psinfo;
- if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
- LL_WARNS() << "Unable to read " << path << LL_ENDL;
- close(proc_fd);
- return;
- }
-
- close(proc_fd);
-
- mExecutableFilename = strdup(proc_psinfo.pr_fname);
- LL_INFOS() << "mExecutableFilename = [" << mExecutableFilename << "]" << LL_ENDL;
-
- sprintf(path, "/proc/%d/path/a.out", (int)getpid());
-
- char execpath[LL_MAX_PATH];
- if(readlink(path, execpath, LL_MAX_PATH) == -1){
- LL_WARNS() << "Unable to read link from " << path << LL_ENDL;
- return;
- }
-
- char *p = execpath; // nuke trash in link, if any exists
- int i = 0;
- while(*p != NULL && ++i < LL_MAX_PATH && isprint((int)(*p++)));
- *p = NULL;
-
- mExecutablePathAndName = strdup(execpath);
- LL_INFOS() << "mExecutablePathAndName = [" << mExecutablePathAndName << "]" << LL_ENDL;
-
- //NOTE: Why force people to cd into the package directory?
- // Look for SECONDLIFE env variable and use it, if set.
-
- auto SECONDLIFE(LLDirUtil::getoptenv("SECONDLIFE"));
- if(SECONDLIFE){
- mExecutableDir = add(*SECONDLIFE, "bin"); //NOTE: make sure we point at the bin
- }else{
- mExecutableDir = getDirName(execpath);
- LL_INFOS() << "mExecutableDir = [" << mExecutableDir << "]" << LL_ENDL;
- }
-
- mLLPluginDir = add(mExecutableDir, "llplugin");
-
- // *TODO: don't use /tmp, use $HOME/.secondlife/tmp or something.
- mTempDir = "/tmp";
-}
-
-LLDir_Solaris::~LLDir_Solaris()
-{
-}
-
-// Implementation
-
-
-void LLDir_Solaris::initAppDirs(const std::string &app_name,
- const std::string& app_read_only_data_dir)
-{
- // Allow override so test apps can read newview directory
- if (!app_read_only_data_dir.empty())
- {
- mAppRODataDir = app_read_only_data_dir;
- mSkinBaseDir = add(mAppRODataDir, "skins");
- }
- mAppName = app_name;
-
- std::string upper_app_name(app_name);
- LLStringUtil::toUpper(upper_app_name);
-
- auto app_home_env(LLStringUtil::getoptenv(upper_app_name + "_USER_DIR"));
- if (app_home_env)
- {
- // user has specified own userappdir i.e. $SECONDLIFE_USER_DIR
- mOSUserAppDir = *app_home_env;
- }
- else
- {
- // traditionally on unixoids, MyApp gets ~/.myapp dir for data
- mOSUserAppDir = mOSUserDir;
- mOSUserAppDir += "/";
- mOSUserAppDir += ".";
- std::string lower_app_name(app_name);
- LLStringUtil::toLower(lower_app_name);
- mOSUserAppDir += lower_app_name;
- }
-
- // create any directories we expect to write to.
-
- int res = LLFile::mkdir(mOSUserAppDir);
- if (res == -1)
- {
- LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL;
- LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL;
- mOSUserAppDir = mOSUserDir;
- }
-
- res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,""));
- if (res == -1)
- {
- LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL;
- }
-
- res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,""));
- if (res == -1)
- {
- LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL;
- }
-
- res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,""));
- if (res == -1)
- {
- LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
- }
-
- mCAFile = getExpandedFilename(LL_PATH_EXECUTABLE, "ca-bundle.crt");
-}
-
-U32 LLDir_Solaris::countFilesInDir(const std::string &dirname, const std::string &mask)
-{
- U32 file_count = 0;
- glob_t g;
-
- std::string tmp_str;
- tmp_str = dirname;
- tmp_str += mask;
-
- if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0)
- {
- file_count = g.gl_pathc;
-
- globfree(&g);
- }
-
- return (file_count);
-}
-
-std::string LLDir_Solaris::getCurPath()
-{
- char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */
- if (getcwd(tmp_str, LL_MAX_PATH) == NULL)
- {
- LL_WARNS() << "Could not get current directory" << LL_ENDL;
- tmp_str[0] = '\0';
- }
- return tmp_str;
-}
-
-
-bool LLDir_Solaris::fileExists(const std::string &filename) const
-{
- struct stat stat_data;
- // Check the age of the file
- // Now, we see if the files we've gathered are recent...
- int res = stat(filename.c_str(), &stat_data);
- if (!res)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
-}
-
diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h
deleted file mode 100644
index c6dac57e14..0000000000
--- a/indra/llvfs/lldir_solaris.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file fmodwrapper.cpp
- * @brief dummy source file for building a shared library to wrap libfmod.a
- *
- * $LicenseInfo:firstyear=2005&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$
- */
-
-#if !LL_SOLARIS
-#error This header must not be included when compiling for any target other than Solaris. Consider including lldir.h instead.
-#endif // !LL_SOLARIS
-
-#ifndef LL_LLDIR_SOLARIS_H
-#define LL_LLDIR_SOLARIS_H
-
-#include "lldir.h"
-
-#include <dirent.h>
-#include <errno.h>
-
-class LLDir_Solaris : public LLDir
-{
-public:
- LLDir_Solaris();
- virtual ~LLDir_Solaris();
-
- /*virtual*/ void initAppDirs(const std::string &app_name,
- const std::string& app_read_only_data_dir);
-
- virtual std::string getCurPath();
- virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
- /*virtual*/ bool fileExists(const std::string &filename) const;
-
-private:
- DIR *mDirp;
- int mCurrentDirIndex;
- int mCurrentDirCount;
- std::string mCurrentDir;
-};
-
-#endif // LL_LLDIR_SOLARIS_H
-
-
diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index 617056d94d..2c64bf563e 100644
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -33,10 +33,6 @@
#include <map>
#if LL_WINDOWS
#include <share.h>
-#elif LL_SOLARIS
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
#else
#include <sys/file.h>
#endif
@@ -2146,12 +2142,6 @@ LLFILE *LLVFS::openAndLock(const std::string& filename, const char* mode, BOOL r
int fd;
// first test the lock in a non-destructive way
-#if LL_SOLARIS
- struct flock fl;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 1;
-#else // !LL_SOLARIS
if (strchr(mode, 'w') != NULL)
{
fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */
@@ -2167,19 +2157,13 @@ LLFILE *LLVFS::openAndLock(const std::string& filename, const char* mode, BOOL r
fclose(fp);
}
}
-#endif // !LL_SOLARIS
// now actually open the file for use
fp = LLFile::fopen(filename, mode); /* Flawfinder: ignore */
if (fp)
{
fd = fileno(fp);
-#if LL_SOLARIS
- fl.l_type = read_lock ? F_RDLCK : F_WRLCK;
- if (fcntl(fd, F_SETLK, &fl) == -1)
-#else
if (flock(fd, (read_lock ? LOCK_SH : LOCK_EX) | LOCK_NB) == -1)
-#endif
{
fclose(fp);
fp = NULL;
@@ -2207,14 +2191,6 @@ void LLVFS::unlockAndClose(LLFILE *fp)
flock(fd, LOCK_UN);
#endif
*/
-#if LL_SOLARIS
- struct flock fl;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 1;
- fl.l_type = F_UNLCK;
- fcntl(fileno(fp), F_SETLK, &fl);
-#endif
fclose(fp);
}
}
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index c20e639fc7..85eb9d6d1b 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -51,13 +51,13 @@ extern "C" {
# include "fontconfig/fontconfig.h"
}
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
// not necessarily available on random SDL platforms, so #if LL_LINUX
// for execv(), waitpid(), fork()
# include <unistd.h>
# include <sys/types.h>
# include <sys/wait.h>
-#endif // LL_LINUX || LL_SOLARIS
+#endif // LL_LINUX
extern BOOL gDebugWindowProc;
@@ -323,12 +323,6 @@ static int x11_detect_VRAM_kb_fp(FILE *fp, const char *prefix_str)
static int x11_detect_VRAM_kb()
{
-#if LL_SOLARIS && defined(__sparc)
- // NOTE: there's no Xorg server on SPARC so just return 0
- // and allow SDL to attempt to get the amount of VRAM
- return(0);
-#else
-
std::string x_log_location("/var/log/");
std::string fname;
int rtn = 0; // 'could not detect'
@@ -409,7 +403,6 @@ static int x11_detect_VRAM_kb()
}
}
return rtn;
-#endif // LL_SOLARIS
}
#endif // LL_X11
@@ -484,27 +477,10 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE,8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
-#if !LL_SOLARIS
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, (bits <= 16) ? 16 : 24);
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, (bits <= 16) ? 16 : 24);
// We need stencil support for a few (minor) things.
if (!getenv("LL_GL_NO_STENCIL"))
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
-#else
- // NOTE- use smaller Z-buffer to enable more graphics cards
- // - This should not affect better GPUs and has been proven
- // to provide 24-bit z-buffers when available.
- //
- // As the API states:
- //
- // GLX_DEPTH_SIZE Must be followed by a nonnegative
- // minimum size specification. If this
- // value is zero, visuals with no depth
- // buffer are preferred. Otherwise, the
- // largest available depth buffer of at
- // least the minimum size is preferred.
-
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
-#endif
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, (bits <= 16) ? 1 : 8);
// *FIX: try to toggle vsync here?
@@ -682,25 +658,13 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
// fixme: actually, it's REALLY important for picking that we get at
// least 8 bits each of red,green,blue. Alpha we can be a bit more
// relaxed about if we have to.
-#if LL_SOLARIS && defined(__sparc)
-// again the __sparc required because Xsun support, 32bit are very pricey on SPARC
- if(colorBits < 24) //HACK: on SPARC allow 24-bit color
-#else
if (colorBits < 32)
-#endif
{
close();
setupFailure(
-#if LL_SOLARIS && defined(__sparc)
- "Second Life requires at least 24-bit color on SPARC to run in a window.\n"
- "Please use fbconfig to set your default color depth to 24 bits.\n"
- "You may also need to adjust the X11 setting in SMF. To do so use\n"
- " 'svccfg -s svc:/application/x11/x11-server setprop options/default_depth=24'\n"
-#else
"Second Life requires True Color (32-bit) to run in a window.\n"
"Please go to Control Panels -> Display -> Settings and\n"
"set the screen to 32-bit color.\n"
-#endif
"Alternately, if you choose to run fullscreen, Second Life\n"
"will automatically adjust the screen each time it runs.",
"Error",
@@ -2503,7 +2467,7 @@ BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
}
#endif // LL_GTK
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
// extracted from spawnWebBrowser for clarity and to eliminate
// compiler confusion regarding close(int fd) vs. LLWindow::close()
void exec_cmd(const std::string& cmd, const std::string& arg)
@@ -2559,7 +2523,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
LL_INFOS() << "spawn_web_browser: " << escaped_url << LL_ENDL;
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
# if LL_X11
if (mSDL_Display)
{
@@ -2578,7 +2542,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
cmd += "launch_url.sh";
arg = escaped_url;
exec_cmd(cmd, arg);
-#endif // LL_LINUX || LL_SOLARIS
+#endif // LL_LINUX
LL_INFOS() << "spawn_web_browser returning." << LL_ENDL;
}
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index f774cd0d31..b2b123f0da 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -483,7 +483,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
memset(mPrevGammaRamp, 0, sizeof(mPrevGammaRamp));
mCustomGammaSet = FALSE;
mWindowHandle = NULL;
-
+
if (!SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &mMouseVanish, 0))
{
mMouseVanish = TRUE;
@@ -746,6 +746,37 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
// TrackMouseEvent( &track_mouse_event );
// }
+ // SL-12971 dual GPU display
+ DISPLAY_DEVICEA display_device;
+ int display_index = -1;
+ DWORD display_flags = 0; // EDD_GET_DEVICE_INTERFACE_NAME ?
+ const size_t display_bytes = sizeof(display_device);
+
+ do
+ {
+ if (display_index >= 0)
+ {
+ // CHAR DeviceName [ 32] Adapter name
+ // CHAR DeviceString[128]
+ CHAR text[256];
+
+ size_t name_len = strlen(display_device.DeviceName );
+ size_t desc_len = strlen(display_device.DeviceString);
+
+ CHAR *name = name_len ? display_device.DeviceName : "???";
+ CHAR *desc = desc_len ? display_device.DeviceString : "???";
+
+ sprintf(text, "Display Device %d: %s, %s", display_index, name, desc);
+ LL_INFOS("Window") << text << LL_ENDL;
+ }
+
+ ::ZeroMemory(&display_device,display_bytes);
+ display_device.cb = display_bytes;
+
+ display_index++;
+ } while( EnumDisplayDevicesA(NULL, display_index, &display_device, display_flags ));
+
+ LL_INFOS("Window") << "Total Display Devices: " << display_index << LL_ENDL;
//-----------------------------------------------------------------------
// Create GL drawing context
@@ -1271,22 +1302,22 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
{
// Looks like ChoosePixelFormat can crash in case of faulty driver
if (!(pixel_format = SafeChoosePixelFormat(mhDC, &pfd)))
- {
+ {
LL_WARNS("Window") << "ChoosePixelFormat failed, code: " << GetLastError() << LL_ENDL;
OSMessageBox(mCallbacks->translateString("MBPixelFmtErr"),
mCallbacks->translateString("MBError"), OSMB_OK);
- close();
+ close();
return FALSE;
}
}
catch (...)
{
LOG_UNHANDLED_EXCEPTION("ChoosePixelFormat");
- OSMessageBox(mCallbacks->translateString("MBPixelFmtErr"),
- mCallbacks->translateString("MBError"), OSMB_OK);
+ OSMessageBox(mCallbacks->translateString("MBPixelFmtErr"),
+ mCallbacks->translateString("MBError"), OSMB_OK);
close();
- return FALSE;
- }
+ return FALSE;
+ }
LL_INFOS("Window") << "Pixel format chosen." << LL_ENDL ;
@@ -1513,21 +1544,27 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
LL_INFOS("Window") << "pixel formats done." << LL_ENDL ;
S32 swap_method = 0;
- S32 cur_format = num_formats-1;
+ S32 cur_format = 0;
+const S32 max_format = (S32)num_formats - 1;
GLint swap_query = WGL_SWAP_METHOD_ARB;
- BOOL found_format = FALSE;
-
- while (!found_format && wglGetPixelFormatAttribivARB(mhDC, pixel_format, 0, 1, &swap_query, &swap_method))
+ // SL-14705 Fix name tags showing in front of objects with AMD GPUs.
+ // On AMD hardware we need to iterate from the first pixel format to the end.
+ // Spec:
+ // https://www.khronos.org/registry/OpenGL/extensions/ARB/WGL_ARB_pixel_format.txt
+ while (wglGetPixelFormatAttribivARB(mhDC, pixel_formats[cur_format], 0, 1, &swap_query, &swap_method))
{
- if (swap_method == WGL_SWAP_UNDEFINED_ARB || cur_format <= 0)
+ if (swap_method == WGL_SWAP_UNDEFINED_ARB)
{
- found_format = TRUE;
+ break;
}
- else
+ else if (cur_format >= max_format)
{
- --cur_format;
+ cur_format = 0;
+ break;
}
+
+ ++cur_format;
}
pixel_format = pixel_formats[cur_format];
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 397691d7cf..424fd17707 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -209,6 +209,7 @@ set(viewer_SOURCE_FILES
llflexibleobject.cpp
llfloaterabout.cpp
llfloaterbvhpreview.cpp
+ llfloateraddpaymentmethod.cpp
llfloaterauction.cpp
llfloaterautoreplacesettings.cpp
llfloateravatar.cpp
@@ -232,6 +233,7 @@ set(viewer_SOURCE_FILES
llfloatercolorpicker.cpp
llfloaterconversationlog.cpp
llfloaterconversationpreview.cpp
+ llfloatercreatelandmark.cpp
llfloaterdeleteprefpreset.cpp
llfloaterdestinations.cpp
llfloatereditenvironmentbase.cpp
@@ -254,6 +256,7 @@ set(viewer_SOURCE_FILES
llfloaterhandler.cpp
llfloaterhelpbrowser.cpp
llfloaterhoverheight.cpp
+ llfloaterhowto.cpp
llfloaterhud.cpp
llfloaterimagepreview.cpp
llfloaterimsessiontab.cpp
@@ -586,6 +589,7 @@ set(viewer_SOURCE_FILES
llsyntaxid.cpp
llsyswellitem.cpp
llsyswellwindow.cpp
+ lltelemetry.cpp
llteleporthistory.cpp
llteleporthistorystorage.cpp
lltextureatlas.cpp
@@ -635,6 +639,7 @@ set(viewer_SOURCE_FILES
llurl.cpp
llurldispatcher.cpp
llurldispatcherlistener.cpp
+ llurlfloaterdispatchhandler.cpp
llurlhistory.cpp
llurllineeditorctrl.cpp
llurlwhitelist.cpp
@@ -843,6 +848,7 @@ set(viewer_HEADER_FILES
llflexibleobject.h
llfloaterabout.h
llfloaterbvhpreview.h
+ llfloateraddpaymentmethod.h
llfloaterauction.h
llfloaterautoreplacesettings.h
llfloateravatar.h
@@ -866,6 +872,7 @@ set(viewer_HEADER_FILES
llfloatercolorpicker.h
llfloaterconversationlog.h
llfloaterconversationpreview.h
+ llfloatercreatelandmark.h
llfloaterdeleteprefpreset.h
llfloaterdestinations.h
llfloatereditenvironmentbase.h
@@ -888,6 +895,7 @@ set(viewer_HEADER_FILES
llfloaterhandler.h
llfloaterhelpbrowser.h
llfloaterhoverheight.h
+ llfloaterhowto.h
llfloaterhud.h
llfloaterimagepreview.h
llfloaterimnearbychat.h
@@ -1263,6 +1271,7 @@ set(viewer_HEADER_FILES
llurl.h
llurldispatcher.h
llurldispatcherlistener.h
+ llurlfloaterdispatchhandler.h
llurlhistory.h
llurllineeditorctrl.h
llurlwhitelist.h
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 427dc381ad..22beed373e 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-6.4.19
+6.4.21
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 9a4ab8b44b..d0480ca47e 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -88,8 +88,10 @@
icon="Command_HowTo_Icon"
label_ref="Command_HowTo_Label"
tooltip_ref="Command_HowTo_Tooltip"
- execute_function="Help.ToggleHowTo"
- is_running_function="Help.HowToVisible"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="guidebook"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="guidebook"
/>
<command name="inventory"
available_in_toybox="true"
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 77f0fd99bc..a2933b85a5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4725,6 +4725,17 @@
<key>Value</key>
<string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
+ <key>GuidebookURL</key>
+ <map>
+ <key>Comment</key>
+ <string>URL for Guidebook content</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://guidebooks.secondlife.io/welcome/index.html</string>
+ </map>
<key>HighResSnapshot</key>
<map>
<key>Comment</key>
@@ -6586,7 +6597,7 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>MemoryFailurePreventionEnabled</key>
+ <key>MemoryFailurePreventionEnabled</key> <!-- deprecated, only used for obsolete-in-2020 Intel 965 Express GPU -->
<map>
<key>Comment</key>
<string>If set, the viewer will quit to avoid crash when memory failure happens</string>
@@ -9113,7 +9124,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>0.03</real>
+ <real>0.1</real>
</map>
<key>RenderDebugPipeline</key>
<map>
@@ -14425,7 +14436,53 @@
<key>Value</key>
<integer>44125</integer>
</map>
- <key>VoiceCallsFriendsOnly</key>
+
+ <key>VivoxVadAuto</key>
+ <map>
+ <key>Comment</key>
+ <string>A flag indicating if the automatic VAD is enabled (1) or disabled (0). The individual settings are ignored if the auto-mode is enabled</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>VivoxVadHangover</key>
+ <map>
+ <key>Comment</key>
+ <string>The time (in milliseconds) that it takes or the VAD to switch back to silence from speech mode after the last speech frame has been detected</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>2000</integer>
+ </map>
+ <key>VivoxVadNoiseFloor</key>
+ <map>
+ <key>Comment</key>
+ <string>A dimensionless value between 0 and 20000 (default 576) that controls the maximum level at which the noise floor may be set at by the VAD's noise tracking</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>576</integer>
+ </map>
+ <key>VivoxVadSensitivity</key>
+ <map>
+ <key>Comment</key>
+ <string>
+ A dimensionless value between 0 and 100, indicating the 'sensitivity of the VAD'. Increasing this value corresponds to decreasing the sensitivity of the VAD and 0 is turned off altogether</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>VoiceCallsFriendsOnly</key>
<map>
<key>Comment</key>
<string>(Deprecated) Only accept voice calls from residents on your friends list</string>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index b7036e02cf..8e0a001403 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -1,24 +1,24 @@
-/**
+/**
* @file WLCloudsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2005, 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$
*/
@@ -33,26 +33,26 @@ ATTRIBUTE vec2 texcoord0;
///////////////////////////////////////////////////////////////////////////////
// Output parameters
-VARYING vec4 vary_CloudColorSun;
-VARYING vec4 vary_CloudColorAmbient;
+VARYING vec4 vary_CloudColorSun;
+VARYING vec4 vary_CloudColorAmbient;
VARYING float vary_CloudDensity;
-VARYING vec2 vary_texcoord0;
-VARYING vec2 vary_texcoord1;
-VARYING vec2 vary_texcoord2;
-VARYING vec2 vary_texcoord3;
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+VARYING vec2 vary_texcoord2;
+VARYING vec2 vary_texcoord3;
VARYING float altitude_blend_factor;
// Inputs
uniform vec3 camPosLocal;
-uniform vec4 lightnorm;
-uniform vec4 sunlight_color;
-uniform vec4 moonlight_color;
-uniform int sun_up_factor;
-uniform vec4 ambient_color;
-uniform vec4 blue_horizon;
-uniform vec4 blue_density;
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 moonlight_color;
+uniform int sun_up_factor;
+uniform vec4 ambient_color;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
uniform float haze_horizon;
uniform float haze_density;
@@ -60,7 +60,7 @@ uniform float cloud_shadow;
uniform float density_multiplier;
uniform float max_y;
-uniform vec4 glow;
+uniform vec4 glow;
uniform float sun_moon_glow_factor;
uniform vec4 cloud_color;
@@ -75,53 +75,53 @@ uniform float cloud_scale;
// indra\newview\llsettingsvo.cpp
void main()
{
- // World / view / projection
- gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ // World / view / projection
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
- // Texture coords
+ // Texture coords
// SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll
vary_texcoord0 = vec2(-texcoord0.x, texcoord0.y); // See: LLSettingsVOSky::applySpecial
- vary_texcoord0.xy -= 0.5;
- vary_texcoord0.xy /= cloud_scale;
- vary_texcoord0.xy += 0.5;
+ vary_texcoord0.xy -= 0.5;
+ vary_texcoord0.xy /= cloud_scale;
+ vary_texcoord0.xy += 0.5;
- vary_texcoord1 = vary_texcoord0;
- vary_texcoord1.x += lightnorm.x * 0.0125;
- vary_texcoord1.y += lightnorm.z * 0.0125;
+ vary_texcoord1 = vary_texcoord0;
+ vary_texcoord1.x += lightnorm.x * 0.0125;
+ vary_texcoord1.y += lightnorm.z * 0.0125;
- vary_texcoord2 = vary_texcoord0 * 16.;
- vary_texcoord3 = vary_texcoord1 * 16.;
+ vary_texcoord2 = vary_texcoord0 * 16.;
+ vary_texcoord3 = vary_texcoord1 * 16.;
- // Get relative position
+ // Get relative position
vec3 rel_pos = position.xyz - camPosLocal.xyz + vec3(0, 50, 0);
altitude_blend_factor = clamp((rel_pos.y + 512.0) / max_y, 0.0, 1.0);
- // Set altitude
+ // Set altitude
if (rel_pos.y > 0)
- {
+ {
rel_pos *= (max_y / rel_pos.y);
- }
+ }
if (rel_pos.y < 0)
- {
- altitude_blend_factor = 0; // SL-11589 Fix clouds drooping below horizon
+ {
+ altitude_blend_factor = 0; // SL-11589 Fix clouds drooping below horizon
rel_pos *= (-32000. / rel_pos.y);
- }
+ }
- // Can normalize then
+ // Can normalize then
vec3 rel_pos_norm = normalize(rel_pos);
float rel_pos_len = length(rel_pos);
- // Initialize temp variables
- vec4 sunlight = sunlight_color;
- vec4 light_atten;
+ // Initialize temp variables
+ 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
+ // Sunlight attenuation effect (hue and brightness) due to atmosphere
+ // this is used later for sunlight modulation at various altitudes
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
- // Calculate relative weights
+ // Calculate relative weights
vec4 combined_haze = abs(blue_density) + vec4(abs(haze_density));
vec4 blue_weight = blue_density / combined_haze;
vec4 haze_weight = haze_density / combined_haze;
@@ -130,63 +130,64 @@ void main()
float off_axis = 1.0 / max(1e-6, max(0., rel_pos_norm.y) + lightnorm.y);
sunlight *= exp(-light_atten * off_axis);
- // Distance
+ // Distance
float density_dist = rel_pos_len * density_multiplier;
// Transparency (-> combined_haze)
// ATI Bugfix -- can't store combined_haze*density_dist in a variable because the ati
- // compiler gets confused.
+ // compiler gets confused.
combined_haze = exp(-combined_haze * density_dist);
- // Compute haze glow
+ // Compute haze glow
float haze_glow = 1.0 - dot(rel_pos_norm, lightnorm.xyz);
// haze_glow is 0 at the sun and increases away from sun
haze_glow = max(haze_glow, .001);
- // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
+ // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
haze_glow *= glow.x;
- // Higher glow.x gives dimmer glow (because next step is 1 / "angle")
+ // Higher glow.x gives dimmer glow (because next step is 1 / "angle")
haze_glow = pow(haze_glow, glow.z);
- // glow.z should be negative, so we're doing a sort of (1 / "angle") function
+ // glow.z should be negative, so we're doing a sort of (1 / "angle") function
haze_glow *= sun_moon_glow_factor;
- // Add "minimum anti-solar illumination"
+ // Add "minimum anti-solar illumination"
// For sun, add to glow. For moon, remove glow entirely. SL-13768
haze_glow = (sun_moon_glow_factor < 1.0) ? 0.0 : (haze_glow + 0.25);
- // Increase ambient when there are more clouds
- vec4 tmpAmbient = ambient_color;
- tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
+ // Increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient_color;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
- // Dim sunlight by cloud shadow percentage
- sunlight *= (1. - cloud_shadow);
+ // Dim sunlight by cloud shadow percentage
+ sunlight *= (1. - cloud_shadow);
- // Haze color below cloud
+ // Haze color below cloud
vec4 additiveColorBelowCloud =
(blue_horizon * blue_weight * (sunlight + tmpAmbient) + (haze_horizon * haze_weight) * (sunlight * haze_glow + tmpAmbient));
- // CLOUDS
+ // CLOUDS
+ sunlight = sunlight_color; // SL-14707 reset color -- Clouds are unusually dim in EEP
off_axis = 1.0 / max(1e-6, lightnorm.y * 2.);
sunlight *= exp(-light_atten * off_axis);
- // Cloud color out
+ // Cloud color out
vary_CloudColorSun = (sunlight * haze_glow) * cloud_color;
- vary_CloudColorAmbient = tmpAmbient * cloud_color;
-
- // Attenuate cloud color by atmosphere
+ vary_CloudColorAmbient = tmpAmbient * cloud_color;
+
+ // Attenuate cloud color by atmosphere
combined_haze = sqrt(combined_haze); // less atmos opacity (more transparency) below clouds
vary_CloudColorSun *= combined_haze;
vary_CloudColorAmbient *= combined_haze;
vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - combined_haze);
- // Make a nice cloud density based on the cloud_shadow value that was passed in.
- vary_CloudDensity = 2. * (cloud_shadow - 0.25);
+ // Make a nice cloud density based on the cloud_shadow value that was passed in.
+ vary_CloudDensity = 2. * (cloud_shadow - 0.25);
- // Combine these to minimize register use
- vary_CloudColorAmbient += oHazeColorBelowCloud;
+ // Combine these to minimize register use
+ vary_CloudColorAmbient += oHazeColorBelowCloud;
- // needs this to compile on mac
- // vary_AtmosAttenuation = vec3(0.0,0.0,0.0);
+ // needs this to compile on mac
+ //vary_AtmosAttenuation = vec3(0.0,0.0,0.0);
- // END CLOUDS
+ // END CLOUDS
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl
index 6b36d00f97..9fcee04c32 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl
@@ -64,28 +64,27 @@ void main()
#else
vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
#endif
-
+
color.rgb *= vertex_color.rgb;
// SL-9632 HUDs are affected by Atmosphere
if (no_atmo == 0)
{
- vec3 sunlit;
- vec3 amblit;
- vec3 additive;
- vec3 atten;
+ vec3 sunlit;
+ vec3 amblit;
+ vec3 additive;
+ vec3 atten;
vec3 pos = vary_position.xyz/vary_position.w;
- calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false);
-
- vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
- float env_intensity = vertex_color.a;
+ calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false);
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ float env_intensity = vertex_color.a;
//color.rgb = srgb_to_linear(color.rgb);
color.rgb = mix(color.rgb, envColor.rgb, env_intensity);
-
- color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
}
/*
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index d29e8a9423..eb6e56e718 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -40,6 +40,8 @@ uniform sampler2D specularMap;
VARYING vec2 vary_texcoord0;
+vec3 linear_to_srgb(vec3 c);
+
void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
@@ -52,6 +54,7 @@ void main()
vec4 norm = texture2D(normalMap, vary_texcoord0.xy);
vec4 spec = texture2D(specularMap, vary_texcoord0.xy);
+ col.rgb = linear_to_srgb(col.rgb);
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = spec;
frag_data[2] = vec4(norm.xy,0,0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 80d19102b6..e1f7031af6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -406,6 +406,8 @@ void main()
vec3 light = vec3(0, 0, 0);
+ final_specular.rgb = srgb_to_linear(final_specular.rgb); // SL-14035
+
#define LIGHT_LOOP(i) light.rgb += calcPointLightOrSpotLight(light_diffuse[i].rgb, npos, diffuse.rgb, final_specular, pos.xyz, norm.xyz, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z, glare, light_attenuation[i].w );
LIGHT_LOOP(1)
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index 8c402fcb54..09c47165dd 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -73,9 +73,7 @@ void main()
vec3 norm = getNorm(frag.xy);
vec4 spec = texture2DRect(specularRect, frag.xy);
- spec.rgb = srgb_to_linear(spec.rgb);
vec3 diff = texture2DRect(diffuseRect, frag.xy).rgb;
- diff.rgb = srgb_to_linear(diff.rgb);
float noise = texture2D(noiseMap, frag.xy / 128.0).b;
vec3 npos = normalize(-pos);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index 9bba45bc4e..ec3fb9c543 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -182,10 +182,6 @@ void main()
vec3 diff_tex = texture2DRect(diffuseRect, frag.xy).rgb;
- // SL-12005 Projector light pops as we get closer, more objectionable than being in wrong color space.
- // We can't switch to linear here unless we do it everywhere*
- // *gbuffer is sRGB, convert to linear whenever sampling from it
- diff_tex.rgb = srgb_to_linear(diff_tex.rgb);
vec3 dlit = vec3(0, 0, 0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
index d805c9ea48..18616a9bb3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
@@ -90,7 +90,6 @@ void main()
float noise = texture2D(noiseMap, frag.xy/128.0).b;
vec3 col = texture2DRect(diffuseRect, frag.xy).rgb;
- col.rgb = srgb_to_linear(col.rgb);
float fa = falloff+1.0;
float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0);
@@ -127,7 +126,7 @@ void main()
{
discard;
}
-//col.rgb = vec3(0);
+
frag_color.rgb = col;
frag_color.a = 0.0;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index f80f1a985a..7f2c603f87 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -90,7 +90,7 @@ void main()
vec4 diffuse = texture2DRect(diffuseRect, tc);
//convert to gamma space
- //diffuse.rgb = linear_to_srgb(diffuse.rgb);
+ diffuse.rgb = linear_to_srgb(diffuse.rgb); // SL-14035
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
vec3 color = vec3(0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
index 454af2a9bc..b2fa5d8a25 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
@@ -49,10 +49,6 @@ void main()
vec4 sunDiscB = texture2D(altDiffuseMap, vary_texcoord0.xy);
vec4 c = mix(sunDiscA, sunDiscB, blend_factor);
- c.rgb = srgb_to_linear(c.rgb);
- c.rgb = clamp(c.rgb, vec3(0), vec3(1));
- c.rgb = pow(c.rgb, vec3(0.7f));
-
//c.rgb = fullbrightAtmosTransport(c.rgb);
c.rgb = fullbrightScaleSoftClip(c.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
index 6f7e777d23..5e966293c6 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -48,15 +48,15 @@ void fullbright_shiny_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy);
color.rgb *= vertex_color.rgb;
-
+
// SL-9632 HUDs are affected by Atmosphere
if (no_atmo == 0)
{
- vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low
- color.rgb = fullbrightShinyAtmosTransport(color.rgb);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
}
/*
// NOTE: HUD objects will be full bright. Uncomment if you want "some" environment lighting effecting these HUD objects.
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
index a0699affbf..3b4d358cfa 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
@@ -1,30 +1,37 @@
-/**
+/**
* @file class1\windlight\atmosphericVarsF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, 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$
*/
-
-vec3 getPositionEye()
-{
- return vec3(0,0,0);
-}
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
+
+vec3 getAmblitColor() { return vec3(0, 0, 0); }
+
+vec3 getAdditiveColor() { return vary_AdditiveColor; }
+
+vec3 getAtmosAttenuation() { return vec3(vary_AtmosAttenuation); }
+
+vec3 getSunlitColor() { return vec3(0, 0, 0); }
+
+vec3 getPositionEye() { return vec3(0, 0, 0); }
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
index bd1d150fc8..1fea2c3628 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
@@ -1,36 +1,56 @@
-/**
+/**
* @file class1\windlight\atmosphericVarsV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, 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$
*/
-
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
-vec3 getPositionEye()
+vec3 additive_color;
+vec3 atmos_attenuation;
+vec3 sunlit_color;
+vec3 amblit_color;
+vec3 position_eye;
+
+vec3 getSunlitColor() { return sunlit_color; }
+void setSunlitColor(vec3 v) { sunlit_color = v; }
+
+vec3 getAdditiveColor() { return additive_color; }
+void setAdditiveColor(vec3 v)
{
- return vec3(0,0,0);
+ additive_color = v;
+ vary_AdditiveColor = v;
}
-void setPositionEye(vec3 v)
+vec3 getAmblitColor() { return amblit_color; }
+void setAmblitColor(vec3 v) { amblit_color = v; }
+
+vec3 getAtmosAttenuation() { return atmos_attenuation; }
+void setAtmosAttenuation(vec3 v)
{
-
+ atmos_attenuation = v;
+ vary_AtmosAttenuation = v;
}
+
+vec3 getPositionEye() { return position_eye; }
+void setPositionEye(vec3 v) { position_eye = v; }
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl
index 5dc086ab1e..f83434b7ec 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl
@@ -1,33 +1,38 @@
-/**
+/**
* @file class1\windlight\atmosphericVarsWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, 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$
*/
-
VARYING vec3 vary_PositionEye;
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
+
+vec3 getSunlitColor() { return vec3(0, 0, 0); }
+
+vec3 getAmblitColor() { return vec3(0, 0, 0); }
+
+vec3 getAdditiveColor() { return vary_AdditiveColor; }
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
+vec3 getAtmosAttenuation() { return vary_AtmosAttenuation; }
+vec3 getPositionEye() { return vary_PositionEye; }
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
index e59eca265a..65d1176777 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
@@ -1,37 +1,51 @@
-/**
+/**
* @file class1\windlight\atmosphericVarsWaterV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, 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$
*/
-
-
+
VARYING vec3 vary_PositionEye;
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
+vec3 atmos_attenuation;
+vec3 sunlit_color;
+vec3 amblit_color;
+
+vec3 getSunlitColor() { return sunlit_color; }
+void setSunlitColor(vec3 v) { sunlit_color = v; }
+
+vec3 getAmblitColor() { return amblit_color; }
+void setAmblitColor(vec3 v) { amblit_color = v; }
-void setPositionEye(vec3 v)
+vec3 getAdditiveColor() { return vary_AdditiveColor; }
+void setAdditiveColor(vec3 v) { vary_AdditiveColor = v; }
+
+vec3 getAtmosAttenuation() { return atmos_attenuation; }
+void setAtmosAttenuation(vec3 v)
{
- vary_PositionEye = v;
+ atmos_attenuation = v;
+ vary_AtmosAttenuation = v;
}
+
+vec3 getPositionEye() { return vary_PositionEye; }
+void setPositionEye(vec3 v) { vary_PositionEye = v; }
diff --git a/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl
index b9ae7a0226..5a41dc644a 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscF.glsl
@@ -51,7 +51,6 @@ void main()
// SL-9806 stars poke through
// c.a *= sun_fade;
- c.rgb = pow(c.rgb, vec3(0.7f));
c.rgb = fullbrightAtmosTransport(c.rgb);
c.rgb = fullbrightScaleSoftClip(c.rgb);
frag_color = c;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 5d7a28c359..1b7a1cc6ec 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -191,10 +191,6 @@ void main()
float da = dot(norm, lv);
vec3 diff_tex = texture2DRect(diffuseRect, frag.xy).rgb;
- // SL-12005 Projector light pops as we get closer, more objectionable than being in wrong color space.
- // We can't switch to linear here unless we do it everywhere*
- // *gbuffer IS sRGB, convert to linear since this shader outputs linear
- diff_tex.rgb = srgb_to_linear(diff_tex.rgb);
vec4 spec = texture2DRect(specularRect, frag.xy);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
index 1485c515a4..6841a8194f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
@@ -73,7 +73,21 @@ uniform float ice_level;
vec3 rainbow(float d)
{
- d = clamp(d, -1.0, 0.0);
+ // d is the dot product of view and sun directions, so ranging -1.0..1.0
+ // 'interesting' values of d are the range -0.75..-0.825, when view is nearly opposite of sun vec
+ // Rainbox texture mode is GL_REPEAT, so tc of -.75 is equiv to 0.25, -0.825 equiv to 0.175.
+
+ // SL-13629 Rainbow texture has colors within the correct .175...250 range, but order is inverted.
+ // Rather than replace the texture, we mirror and translate the y tc to keep the colors within the
+ // interesting range, but in reversed order: i.e. d = (1 - d) - 1.575
+ d = clamp(-0.575 - d, 0.0, 1.0);
+
+ // With the colors in the lower 1/4 of the texture, inverting the coords leaves most of it inaccessible.
+ // So, we can stretch the texcoord above the colors (ie > 0.25) to fill the entire remaining coordinate
+ // space. This improves gradation, reduces banding within the rainbow interior. (1-0.25) / (0.425/0.25) = 4.2857
+ float interior_coord = max(0.0, d - 0.25) * 4.2857;
+ d = clamp(d, 0.0, 0.25) + interior_coord;
+
float rad = (droplet_radius - 5.0f) / 1024.0f;
return pow(texture2D(rainbow_map, vec2(rad, d)).rgb, vec3(1.8)) * moisture_level;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index f4db53e0b7..7700d16007 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -87,8 +87,9 @@ void main()
float light_gamma = 1.0 / 1.3;
da = pow(da, light_gamma);
- vec4 diffuse = texture2DRect(diffuseRect, tc);
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
+ vec4 diffuse = texture2DRect(diffuseRect, tc);
+ diffuse.rgb = linear_to_srgb(diffuse.rgb); // SL-14025
+ vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
scol_ambocc = pow(scol_ambocc, vec2(light_gamma));
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 5ab0b5c5b4..774f537821 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -189,7 +189,7 @@ void main()
lv = normalize(lv);
float da = dot(norm, lv);
- vec3 diff_tex = srgb_to_linear(texture2DRect(diffuseRect, frag.xy).rgb);
+ vec3 diff_tex = texture2DRect(diffuseRect, frag.xy).rgb;
vec4 spec = texture2DRect(specularRect, frag.xy);
vec3 dlit = vec3(0, 0, 0);
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
index d758f85d71..07733bda18 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
@@ -1,5 +1,5 @@
/**
- * @file class2\wl\atmosphericVars.glsl
+ * @file class2\wl\atmosphericVarsF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
index 75bf8730df..fa928d993e 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
@@ -26,9 +26,9 @@
/*[EXTRA_CODE_HERE]*/
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 frag_data[3];
+out vec4 frag_color;
#else
-#define frag_data gl_FragData
+#define frag_color gl_FragColor
#endif
/////////////////////////////////////////////////////////////////////////
@@ -126,8 +126,6 @@ void main()
color.rgb = scaleSoftClip(color.rgb);
/// Gamma correct for WL (soft clip effect).
- frag_data[0] = vec4(color.rgb, alpha1);
- frag_data[1] = vec4(0.0,0.0,0.0,0.0);
- frag_data[2] = vec4(0,0,0,1);
+ frag_color = vec4(color.rgb, alpha1);
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index 1f881eb44b..97ffa9feef 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -1,24 +1,24 @@
-/**
+/**
* @file class2\wl\cloudsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2005, 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$
*/
@@ -33,26 +33,26 @@ ATTRIBUTE vec2 texcoord0;
///////////////////////////////////////////////////////////////////////////////
// Output parameters
-VARYING vec4 vary_CloudColorSun;
-VARYING vec4 vary_CloudColorAmbient;
+VARYING vec4 vary_CloudColorSun;
+VARYING vec4 vary_CloudColorAmbient;
VARYING float vary_CloudDensity;
-VARYING vec2 vary_texcoord0;
-VARYING vec2 vary_texcoord1;
-VARYING vec2 vary_texcoord2;
-VARYING vec2 vary_texcoord3;
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+VARYING vec2 vary_texcoord2;
+VARYING vec2 vary_texcoord3;
VARYING float altitude_blend_factor;
// Inputs
uniform vec3 camPosLocal;
-uniform vec4 lightnorm;
-uniform vec4 sunlight_color;
-uniform vec4 moonlight_color;
-uniform int sun_up_factor;
-uniform vec4 ambient_color;
-uniform vec4 blue_horizon;
-uniform vec4 blue_density;
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 moonlight_color;
+uniform int sun_up_factor;
+uniform vec4 ambient_color;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
uniform float haze_horizon;
uniform float haze_density;
@@ -60,7 +60,7 @@ uniform float cloud_shadow;
uniform float density_multiplier;
uniform float max_y;
-uniform vec4 glow;
+uniform vec4 glow;
uniform float sun_moon_glow_factor;
uniform vec4 cloud_color;
@@ -75,8 +75,8 @@ uniform float cloud_scale;
// indra\newview\llsettingsvo.cpp
void main()
{
- // World / view / projection
- gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ // World / view / projection
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
// Texture coords
// SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll
@@ -93,7 +93,7 @@ void main()
vary_texcoord2 = vary_texcoord0 * 16.;
vary_texcoord3 = vary_texcoord1 * 16.;
- // Get relative position
+ // Get relative position
vec3 rel_pos = position.xyz - camPosLocal.xyz + vec3(0, 50, 0);
// fade clouds beyond a certain point so the bottom of the sky dome doesn't look silly at high altitude
@@ -101,27 +101,27 @@ void main()
// Adj position vector to clamp altitude
if (rel_pos.y > 0.)
- {
+ {
rel_pos *= (max_y / rel_pos.y);
- }
+ }
if (rel_pos.y < 0.)
- {
+ {
rel_pos *= (-32000. / rel_pos.y);
- }
+ }
- // Can normalize then
+ // Can normalize then
vec3 rel_pos_norm = normalize(rel_pos);
float rel_pos_len = length(rel_pos);
- // Initialize temp variables
- vec4 sunlight = sunlight_color;
- vec4 light_atten;
+ // Initialize temp variables
+ 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
+ // Sunlight attenuation effect (hue and brightness) due to atmosphere
+ // this is used later for sunlight modulation at various altitudes
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
- // Calculate relative weights
+ // Calculate relative weights
vec4 combined_haze = abs(blue_density) + vec4(abs(haze_density));
vec4 blue_weight = blue_density / combined_haze;
vec4 haze_weight = haze_density / combined_haze;
@@ -130,63 +130,64 @@ void main()
float off_axis = 1.0 / max(1e-6, max(0., rel_pos_norm.y) + lightnorm.y);
sunlight *= exp(-light_atten * off_axis);
- // Distance
+ // Distance
float density_dist = rel_pos_len * density_multiplier;
// Transparency (-> combined_haze)
// ATI Bugfix -- can't store combined_haze*density_dist in a variable because the ati
- // compiler gets confused.
+ // compiler gets confused.
combined_haze = exp(-combined_haze * density_dist);
- // Compute haze glow
+ // Compute haze glow
float haze_glow = 1.0 - dot(rel_pos_norm, lightnorm.xyz);
// haze_glow is 0 at the sun and increases away from sun
haze_glow = max(haze_glow, .001);
- // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
+ // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
haze_glow *= glow.x;
- // Higher glow.x gives dimmer glow (because next step is 1 / "angle")
+ // Higher glow.x gives dimmer glow (because next step is 1 / "angle")
haze_glow = pow(haze_glow, glow.z);
- // glow.z should be negative, so we're doing a sort of (1 / "angle") function
+ // glow.z should be negative, so we're doing a sort of (1 / "angle") function
haze_glow *= sun_moon_glow_factor;
- // Add "minimum anti-solar illumination"
+ // Add "minimum anti-solar illumination"
// For sun, add to glow. For moon, remove glow entirely. SL-13768
haze_glow = (sun_moon_glow_factor < 1.0) ? 0.0 : (haze_glow + 0.25);
- // Increase ambient when there are more clouds
- vec4 tmpAmbient = ambient_color;
- tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
+ // Increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient_color;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
- // Dim sunlight by cloud shadow percentage
- sunlight *= (1. - cloud_shadow);
+ // Dim sunlight by cloud shadow percentage
+ sunlight *= (1. - cloud_shadow);
- // Haze color below cloud
+ // Haze color below cloud
vec4 additiveColorBelowCloud =
(blue_horizon * blue_weight * (sunlight + tmpAmbient) + (haze_horizon * haze_weight) * (sunlight * haze_glow + tmpAmbient));
- // CLOUDS
+ // CLOUDS
+ sunlight = sunlight_color; // SL-14707 reset color -- Clouds are unusually dim in EEP
off_axis = 1.0 / max(1e-6, lightnorm.y * 2.);
sunlight *= exp(-light_atten * off_axis);
- // Cloud color out
+ // Cloud color out
vary_CloudColorSun = (sunlight * haze_glow) * cloud_color;
- vary_CloudColorAmbient = tmpAmbient * cloud_color;
-
- // Attenuate cloud color by atmosphere
+ vary_CloudColorAmbient = tmpAmbient * cloud_color;
+
+ // Attenuate cloud color by atmosphere
combined_haze = sqrt(combined_haze); // less atmos opacity (more transparency) below clouds
vary_CloudColorSun *= combined_haze;
vary_CloudColorAmbient *= combined_haze;
vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - combined_haze);
- // Make a nice cloud density based on the cloud_shadow value that was passed in.
- vary_CloudDensity = 2. * (cloud_shadow - 0.25);
+ // Make a nice cloud density based on the cloud_shadow value that was passed in.
+ vary_CloudDensity = 2. * (cloud_shadow - 0.25);
- // Combine these to minimize register use
- vary_CloudColorAmbient += oHazeColorBelowCloud;
+ // Combine these to minimize register use
+ vary_CloudColorAmbient += oHazeColorBelowCloud;
- // needs this to compile on mac
- // vary_AtmosAttenuation = vec3(0.0,0.0,0.0);
+ // needs this to compile on mac
+ //vary_AtmosAttenuation = vec3(0.0,0.0,0.0);
- // END CLOUDS
+ // END CLOUDS
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/lightUtil.glsl b/indra/newview/app_settings/shaders/class3/deferred/lightUtil.glsl
deleted file mode 100644
index 8bb3f07fc6..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/lightUtil.glsl
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * @file lightInfo.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, 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$
- */
-
-struct DirectionalLightInfo
-{
- vec4 pos;
- float depth;
- vec4 normal;
- vec3 normalizedLightDirection;
- vec3 normalizedToLight;
- float lightIntensity;
- vec3 lightDiffuseColor;
- float specExponent;
- float shadow;
-};
-
-struct SpotLightInfo
-{
- vec4 pos;
- float depth;
- vec4 normal;
- vec3 normalizedLightDirection;
- vec3 normalizedToLight;
- float lightIntensity;
- float attenuation;
- float distanceToLight;
- vec3 lightDiffuseColor;
- float innerHalfAngleCos;
- float outerHalfAngleCos;
- float spotExponent;
- float specExponent;
- float shadow;
-};
-
-struct PointLightInfo
-{
- vec4 pos;
- float depth;
- vec4 normal;
- vec3 normalizedToLight;
- float lightIntensity;
- float attenuation;
- float distanceToLight;
- vec3 lightDiffuseColor;
- float lightRadius;
- float specExponent;
- vec3 worldspaceLightDirection;
- float shadow;
-};
-
-float attenuate(float attenuationSelection, float distanceToLight)
-{
-// LLRENDER_REVIEW
-// sh/could eventually consume attenuation func defined in texture
- return (attenuationSelection == 0.0f) ? 1.0f : // none
- (attenuationSelection < 1.0f) ? (1.0f / distanceToLight) : // linear atten
- (attenuationSelection < 2.0f) ? (1.0f / (distanceToLight*distanceToLight)) // quadratic atten
- : (1.0f / (distanceToLight*distanceToLight*distanceToLight)); // cubic atten
-}
-
-
-vec3 lightDirectional(struct DirectionalLightInfo dli)
-{
- float lightIntensity = dli.lightIntensity;
- lightIntensity *= dot(dli.normal.xyz, dli.normalizedLightDirection);
- //lightIntensity *= directionalShadowSample(vec4(dli.pos.xyz, 1.0f), dli.depth, dli.directionalShadowMap, dli.directionalShadowMatrix);
- return lightIntensity * dli.lightDiffuseColor;
-}
-
-
-vec3 lightSpot(struct SpotLightInfo sli)
-{
- float penumbraRange = (sli.outerHalfAngleCos - sli.innerHalfAngleCos);
- float coneAngleCos = max(dot(sli.normalizedLightDirection, sli.normalizedToLight), 0.0);
- float coneAttenFactor = (coneAngleCos <= sli.outerHalfAngleCos) ? 1.0f : pow(smoothstep(1,0, sli.outerHalfAngleCos / penumbraRange), sli.spotExponent);
- float distanceAttenuation = attenuate(sli.attenuation, sli.distanceToLight);
- float lightIntensity = sli.lightIntensity;
- lightIntensity *= distanceAttenuation;
- lightIntensity *= max(dot(sli.normal.xyz, sli.normalizedLightDirection), 0.0);
- lightIntensity *= coneAttenFactor;
- lightIntensity *= sli.shadow;
- return lightIntensity * sli.lightDiffuseColor;
-}
-
-vec3 lightPoint(struct PointLightInfo pli)
-{
- float padRadius = pli.lightRadius * 0.1; // distance for which to perform smoothed dropoff past light radius
- float distanceAttenuation = attenuate(pli.attenuation, pli.distanceToLight);
- float lightIntensity = pli.lightIntensity;
- lightIntensity*= distanceAttenuation;
- lightIntensity *= clamp((padRadius - pli.distanceToLight + pli.lightRadius) / padRadius, 0.0, 1.0);
- lightIntensity *= pli.shadow;
- lightIntensity *= max(dot(pli.normal.xyz, pli.normalizedToLight), 0.0);
- return lightIntensity * pli.lightDiffuseColor;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl
index 6de01cb667..a0b082ed7c 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl
@@ -56,8 +56,23 @@ vec3 GetSkyLuminanceToPoint(vec3 camPos, vec3 pos, float shadow_length, vec3 dir
vec3 ColorFromRadiance(vec3 radiance);
vec3 rainbow(float d)
{
- float rad = (droplet_radius - 5.0f) / 1024.0f;
- return pow(texture2D(rainbow_map, vec2(rad, d)).rgb, vec3(1.8)) * moisture_level;
+ // d is the dot product of view and sun directions, so ranging -1.0..1.0
+ // 'interesting' values of d are the range -0.75..-0.825, when view is nearly opposite of sun vec
+ // Rainbox texture mode is GL_REPEAT, so tc of -.75 is equiv to 0.25, -0.825 equiv to 0.175.
+
+ // SL-13629 Rainbow texture has colors within the correct .175...250 range, but order is inverted.
+ // Rather than replace the texture, we mirror and translate the y tc to keep the colors within the
+ // interesting range, but in reversed order: i.e. d = (1 - d) - 1.575
+ d = clamp(-0.575 - d, 0.0, 1.0);
+
+ // With the colors in the lower 1/4 of the texture, inverting the coords leaves most of it inaccessible.
+ // So, we can stretch the texcoord above the colors (ie > 0.25) to fill the entire remaining coordinate
+ // space. This improves gradation, reduces banding within the rainbow interior. (1-0.25) / (0.425/0.25) = 4.2857
+ float interior_coord = max(0.0, d - 0.25) * 4.2857;
+ d = clamp(d, 0.0, 0.25) + interior_coord;
+
+ float rad = (droplet_radius - 5.0f) / 1024.0f;
+ return pow(texture2D(rainbow_map, vec2(rad, d)).rgb, vec3(1.8)) * moisture_level;
}
vec3 halo22(float d)
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index c65bc0fa50..3c50493d79 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -387,6 +387,7 @@ LLAgent::LLAgent() :
mTeleportFinishedSlot(),
mTeleportFailedSlot(),
mIsMaturityRatingChangingDuringTeleport(false),
+ mTPNeedsNeabyChatSeparator(false),
mMaturityRatingChange(0U),
mIsDoSendMaturityPreferenceToServer(false),
mMaturityPreferenceRequestId(0U),
@@ -3934,6 +3935,7 @@ void LLAgent::clearTeleportRequest()
LLVoiceClient::getInstance()->setHidden(FALSE);
}
mTeleportRequest.reset();
+ mTPNeedsNeabyChatSeparator = false;
}
void LLAgent::setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange)
@@ -3942,6 +3944,12 @@ void LLAgent::setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange)
mMaturityRatingChange = pMaturityRatingChange;
}
+void LLAgent::sheduleTeleportIM()
+{
+ // is supposed to be called during teleport so we are still waiting for parcel
+ mTPNeedsNeabyChatSeparator = true;
+}
+
bool LLAgent::hasPendingTeleportRequest()
{
return ((mTeleportRequest != NULL) &&
@@ -3989,6 +3997,12 @@ void LLAgent::startTeleportRequest()
void LLAgent::handleTeleportFinished()
{
LL_INFOS("Teleport") << "Agent handling teleport finished." << LL_ENDL;
+ if (mTPNeedsNeabyChatSeparator)
+ {
+ // parcel is ready at this point
+ addTPNearbyChatSeparator();
+ mTPNeedsNeabyChatSeparator = false;
+ }
clearTeleportRequest();
mTeleportCanceled.reset();
if (mIsMaturityRatingChangingDuringTeleport)
@@ -4051,6 +4065,44 @@ void LLAgent::handleTeleportFailed()
LLNotificationsUtil::add("PreferredMaturityChanged", args);
mIsMaturityRatingChangingDuringTeleport = false;
}
+
+ mTPNeedsNeabyChatSeparator = false;
+}
+
+/*static*/
+void LLAgent::addTPNearbyChatSeparator()
+{
+ LLViewerRegion* agent_region = gAgent.getRegion();
+ LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (!agent_region || !agent_parcel)
+ {
+ return;
+ }
+
+ LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
+ if (nearby_chat)
+ {
+ std::string location_name;
+ LLAgentUI::ELocationFormat format = LLAgentUI::LOCATION_FORMAT_NO_MATURITY;
+
+ // Might be better to provide slurl to chat
+ if (!LLAgentUI::buildLocationString(location_name, format))
+ {
+ location_name = "Teleport to new region"; // Shouldn't happen
+ }
+
+ LLChat chat;
+ chat.mFromName = location_name;
+ chat.mMuted = FALSE;
+ chat.mFromID = LLUUID::null;
+ chat.mSourceType = CHAT_SOURCE_TELEPORT;
+ chat.mChatStyle = CHAT_STYLE_TELEPORT_SEP;
+ chat.mText = "";
+
+ LLSD args;
+ args["do_not_log"] = TRUE;
+ nearby_chat->addMessage(chat, true, args);
+ }
}
/*static*/
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index d46c99db8c..a792d3e11f 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -653,6 +653,7 @@ public:
void restartFailedTeleportRequest();
void clearTeleportRequest();
void setMaturityRatingChangeDuringTeleport(U8 pMaturityRatingChange);
+ void sheduleTeleportIM();
private:
@@ -669,6 +670,7 @@ private:
boost::signals2::connection mTeleportFailedSlot;
bool mIsMaturityRatingChangingDuringTeleport;
+ bool mTPNeedsNeabyChatSeparator;
U8 mMaturityRatingChange;
bool hasPendingTeleportRequest();
@@ -685,6 +687,7 @@ private:
void handleTeleportFinished();
void handleTeleportFailed();
+ static void addTPNearbyChatSeparator();
static void onCapabilitiesReceivedAfterTeleport();
//--------------------------------------------------------------------
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0b2cdff36c..c0971ba943 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -59,6 +59,7 @@
#include "llslurl.h"
#include "llstartup.h"
#include "llfocusmgr.h"
+#include "llurlfloaterdispatchhandler.h"
#include "llviewerjoystick.h"
#include "llallocator.h"
#include "llcalc.h"
@@ -90,6 +91,7 @@
#include "llsdutil_math.h"
#include "lllocationhistory.h"
#include "llfasttimerview.h"
+#include "lltelemetry.h"
#include "llvector4a.h"
#include "llviewermenufile.h"
#include "llvoicechannel.h"
@@ -256,9 +258,9 @@
// define a self-registering event API object
#include "llappviewerlistener.h"
-#if (LL_LINUX || LL_SOLARIS) && LL_GTK
+#if LL_LINUX && LL_GTK
#include "glib.h"
-#endif // (LL_LINUX || LL_SOLARIS) && LL_GTK
+#endif // (LL_LINUX) && LL_GTK
#if LL_MSVC
// disable boost::lexical_cast warning
@@ -917,6 +919,7 @@ bool LLAppViewer::init()
// Load translations for tooltips
LLFloater::initClass();
+ LLUrlFloaterDispatchHandler::registerInDispatcher();
/////////////////////////////////////////////////
@@ -1098,6 +1101,46 @@ bool LLAppViewer::init()
}
}
+#if LL_WINDOWS && ADDRESS_SIZE == 64
+ if (gGLManager.mIsIntel)
+ {
+ // Check intel driver's version
+ // Ex: "3.1.0 - Build 8.15.10.2559";
+ std::string version = ll_safe_string((const char *)glGetString(GL_VERSION));
+
+ const boost::regex is_intel_string("[0-9].[0-9].[0-9] - Build [0-9]{1,2}.[0-9]{2}.[0-9]{2}.[0-9]{4}");
+
+ if (boost::regex_search(version, is_intel_string))
+ {
+ // Valid string, extract driver version
+ std::size_t found = version.find("Build ");
+ std::string driver = version.substr(found + 6);
+ S32 v1, v2, v3, v4;
+ S32 count = sscanf(driver.c_str(), "%d.%d.%d.%d", &v1, &v2, &v3, &v4);
+ if (count > 0 && v1 <= 10)
+ {
+ LL_INFOS("AppInit") << "Detected obsolete intel driver: " << driver << LL_ENDL;
+ LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedIntelDriver");
+ std::string gpu_name = ll_safe_string((const char *)glGetString(GL_RENDERER));
+ details.setArg("[VERSION]", driver);
+ details.setArg("[GPUNAME]", gpu_name);
+ S32 button = OSMessageBox(details.getString(),
+ LLStringUtil::null,
+ OSMB_YESNO);
+ if (OSBTN_YES == button && gViewerWindow)
+ {
+ std::string url = LLWeb::escapeURL(LLTrans::getString("IntelDriverPage"));
+ if (gViewerWindow->getWindow())
+ {
+ gViewerWindow->getWindow()->spawnWebBrowser(url, false);
+ }
+ }
+ }
+ }
+ }
+#endif
+
+ // Obsolete? mExpectedGLVersion is always zero
#if LL_WINDOWS
if (gGLManager.mGLVersion < LLFeatureManager::getInstance()->getExpectedGLVersion())
{
@@ -1322,39 +1365,8 @@ void LLAppViewer::initMaxHeapSize()
//F32 max_heap_size_gb = llmin(1.6f, (F32)gSavedSettings.getF32("MaxHeapSize")) ;
F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
- BOOL enable_mem_failure_prevention = (BOOL)gSavedSettings.getBOOL("MemoryFailurePreventionEnabled") ;
- LLMemory::initMaxHeapSizeGB(max_heap_size_gb, enable_mem_failure_prevention) ;
-}
-
-void LLAppViewer::checkMemory()
-{
- const static F32 MEMORY_CHECK_INTERVAL = 1.0f ; //second
- //const static F32 MAX_QUIT_WAIT_TIME = 30.0f ; //seconds
- //static F32 force_quit_timer = MAX_QUIT_WAIT_TIME + MEMORY_CHECK_INTERVAL ;
-
- if(!gGLManager.mDebugGPU)
- {
- return ;
- }
-
- if(MEMORY_CHECK_INTERVAL > mMemCheckTimer.getElapsedTimeF32())
- {
- return ;
- }
- mMemCheckTimer.reset() ;
-
- //update the availability of memory
- LLMemory::updateMemoryInfo() ;
-
- bool is_low = LLMemory::isMemoryPoolLow() ;
-
- LLPipeline::throttleNewMemoryAllocation(is_low) ;
-
- if(is_low)
- {
- LLMemory::logMemoryInfo() ;
- }
+ LLMemory::initMaxHeapSizeGB(max_heap_size_gb);
}
static LLTrace::BlockTimerStatHandle FTM_MESSAGES("System Messages");
@@ -1433,9 +1445,6 @@ bool LLAppViewer::doFrame()
//clear call stack records
LL_CLEAR_CALLSTACKS();
- //check memory availability information
- checkMemory() ;
-
{
pingMainloopTimeout("Main:MiscNativeWindowEvents");
@@ -1670,6 +1679,8 @@ bool LLAppViewer::doFrame()
LL_INFOS() << "Exiting main_loop" << LL_ENDL;
}
+ LLPROFILE_UPDATE();
+
return ! LLApp::isRunning();
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index d24cdcedc7..5ceb540784 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -235,7 +235,6 @@ private:
bool initConfiguration(); // Initialize settings from the command line/config file.
void initStrings(); // Initialize LLTrans machinery
bool initCache(); // Initialize local client cache.
- void checkMemory() ;
// We have switched locations of both Mac and Windows cache, make sure
// files migrate and old cache is cleared out.
@@ -314,8 +313,6 @@ private:
LLAllocator mAlloc;
- LLFrameTimer mMemCheckTimer;
-
// llcorehttp library init/shutdown helper
LLAppCoreHttp mAppCoreHttp;
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 6f32aab851..dc487967fc 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -73,10 +73,6 @@ static void exceptionTerminateHandler()
int main( int argc, char **argv )
{
-#if LL_SOLARIS && defined(__sparc)
- asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
-#endif
-
gArgC = argc;
gArgV = argv;
@@ -336,8 +332,6 @@ void LLAppViewerLinux::initCrashReporting(bool reportFreeze)
cmd += gDirUtilp->getDirDelimiter();
#if LL_LINUX
cmd += "linux-crash-logger.bin";
-#elif LL_SOLARIS
- cmd += "solaris-crash-logger";
#else
# error Unknown platform
#endif
@@ -394,9 +388,6 @@ bool LLAppViewerLinux::beingDebugged()
{
static enum {unknown, no, yes} debugged = unknown;
-#if LL_SOLARIS
- return debugged == no; // BUG: fix this for Solaris
-#else
if (debugged == unknown)
{
pid_t ppid = getppid();
@@ -431,7 +422,6 @@ bool LLAppViewerLinux::beingDebugged()
}
return debugged == yes;
-#endif
}
void LLAppViewerLinux::initLoggingAndGetLastDuration()
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index 856eb3414e..f41eb3daf4 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -253,6 +253,19 @@ std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_
return LLTrans::getString(payment_text);
}
+//static
+bool LLAvatarPropertiesProcessor::hasPaymentInfoOnFile(const LLAvatarData* avatar_data)
+{
+ // Special accounts like M Linden don't have payment info revealed.
+ if (!avatar_data->caption_text.empty()) return true;
+
+ // Linden employees don't have payment info revealed
+ const S32 LINDEN_EMPLOYEE_INDEX = 3;
+ if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX) return true;
+
+ return ((avatar_data->flags & AVATAR_TRANSACTED) || (avatar_data->flags & AVATAR_IDENTIFIED));
+}
+
void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**)
{
LLAvatarData avatar_data;
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index d5c5c75c69..b063048c26 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -232,6 +232,8 @@ public:
// Used for profiles, inspectors.
static std::string paymentInfo(const LLAvatarData* avatar_data);
+ static bool hasPaymentInfoOnFile(const LLAvatarData* avatar_data);
+
static void processAvatarPropertiesReply(LLMessageSystem* msg, void**);
static void processAvatarInterestsReply(LLMessageSystem* msg, void**);
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 3ab5c669c4..e400609a74 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -58,6 +58,7 @@
#include "llmultigesture.h"
#include "llui.h"
#include "lluictrlfactory.h"
+#include "lluiusage.h"
//
// Globals
@@ -566,6 +567,8 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
// as soon as we say something, we no longer care about teaching the user
// how to chat
gWarningSettings.setBOOL("FirstOtherChatBeforeUser", FALSE);
+
+ LLUIUsage::instance().logCommand("Chat.Send"); // Pseudo-command
// Look for "/20 foo" channel chats.
S32 channel = 0;
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 2ba2c6d8b5..c110e0d815 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -122,6 +122,7 @@ public:
mUserNameFont(NULL),
mUserNameTextBox(NULL),
mTimeBoxTextBox(NULL),
+ mNeedsTimeBox(true),
mAvatarNameCacheConnection()
{}
@@ -643,8 +644,19 @@ public:
user_name->setReadOnlyColor(style_params.readonly_color());
user_name->setColor(style_params.color());
- if (chat.mFromName.empty()
- || mSourceType == CHAT_SOURCE_SYSTEM)
+ if (mSourceType == CHAT_SOURCE_TELEPORT
+ && chat.mChatStyle == CHAT_STYLE_TELEPORT_SEP)
+ {
+ mFrom = chat.mFromName;
+ mNeedsTimeBox = false;
+ user_name->setValue(mFrom);
+ updateMinUserNameWidth();
+ LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
+ setTransparentColor(sep_color);
+ mTimeBoxTextBox->setVisible(FALSE);
+ }
+ else if (chat.mFromName.empty()
+ || mSourceType == CHAT_SOURCE_SYSTEM)
{
mFrom = LLTrans::getString("SECOND_LIFE");
if(!chat.mFromName.empty() && (mFrom != chat.mFromName))
@@ -728,6 +740,9 @@ public:
case CHAT_SOURCE_SYSTEM:
icon->setValue(LLSD("SL_Logo"));
break;
+ case CHAT_SOURCE_TELEPORT:
+ icon->setValue(LLSD("Command_Destinations_Icon"));
+ break;
case CHAT_SOURCE_UNKNOWN:
icon->setValue(LLSD("Unknown_Icon"));
}
@@ -766,7 +781,7 @@ public:
S32 user_name_width = user_name_rect.getWidth();
S32 time_box_width = time_box->getRect().getWidth();
- if (!time_box->getVisible() && user_name_width > mMinUserNameWidth)
+ if (mNeedsTimeBox && !time_box->getVisible() && user_name_width > mMinUserNameWidth)
{
user_name_rect.mRight -= time_box_width;
user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight());
@@ -968,6 +983,8 @@ protected:
LLTextBox* mUserNameTextBox;
LLTextBox* mTimeBoxTextBox;
+ bool mNeedsTimeBox;
+
private:
boost::signals2::connection mAvatarNameCacheConnection;
};
@@ -1202,6 +1219,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
}
bool message_from_log = chat.mChatStyle == CHAT_STYLE_HISTORY;
+ bool teleport_separator = chat.mSourceType == CHAT_SOURCE_TELEPORT;
// We graying out chat history by graying out messages that contains full date in a time string
if (message_from_log)
{
@@ -1222,14 +1240,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
LLStyle::Params timestamp_style(body_message_params);
// out of the timestamp
- if (args["show_time"].asBoolean())
- {
- if (!message_from_log)
+ if (args["show_time"].asBoolean() && !teleport_separator)
{
- LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
- timestamp_style.color(timestamp_color);
- timestamp_style.readonly_color(timestamp_color);
- }
+ if (!message_from_log)
+ {
+ LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
+ timestamp_style.color(timestamp_color);
+ timestamp_style.readonly_color(timestamp_color);
+ }
mEditor->appendText("[" + chat.mTimeStr + "] ", prependNewLineState, timestamp_style);
prependNewLineState = false;
}
@@ -1272,6 +1290,13 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
prependNewLineState, link_params);
prependNewLineState = false;
}
+ else if (teleport_separator)
+ {
+ std::string tp_text = LLTrans::getString("teleport_preamble_compact_chat");
+ mEditor->appendText(tp_text + " <nolink>" + chat.mFromName + "</nolink>",
+ prependNewLineState, body_message_params);
+ prependNewLineState = false;
+ }
else
{
mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter,
@@ -1290,8 +1315,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
p.right_pad = mRightWidgetPad;
LLDate new_message_time = LLDate::now();
-
- if (mLastFromName == chat.mFromName
+ if (!teleport_separator
+ && mLastFromName == chat.mFromName
&& mLastFromID == chat.mFromID
&& mLastMessageTime.notNull()
&& (new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0
@@ -1314,7 +1339,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
p.top_pad = 0;
else
p.top_pad = mTopHeaderPad;
- p.bottom_pad = mBottomHeaderPad;
+ if (teleport_separator)
+ {
+ p.bottom_pad = mBottomSeparatorPad;
+ }
+ else
+ {
+ p.bottom_pad = mBottomHeaderPad;
+ }
if (!view)
{
LL_WARNS() << "Failed to create header from " << mMessageHeaderFilename << ": can't append to history" << LL_ENDL;
@@ -1392,9 +1424,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
}
}
}
-
// usual messages showing
- else
+ else if(!teleport_separator)
{
std::string message = irc_me ? chat.mText.substr(3) : chat.mText;
@@ -1427,7 +1458,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
if (square_brackets)
{
message += "]";
- }
+ }
mEditor->appendText(message, prependNewLineState, body_message_params);
prependNewLineState = false;
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 4cfde21e32..a685639427 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -380,7 +380,7 @@ LLConversationItemParticipant* LLConversationItemSession::findParticipant(const
for (iter = mChildren.begin(); iter != mChildren.end(); iter++)
{
participant = dynamic_cast<LLConversationItemParticipant*>(*iter);
- if (participant->hasSameValue(participant_id))
+ if (participant && participant->hasSameValue(participant_id))
{
break;
}
@@ -491,7 +491,7 @@ const bool LLConversationItemSession::getTime(F64& time) const
{
participant = dynamic_cast<LLConversationItemParticipant*>(*iter);
F64 participant_time;
- if (participant->getTime(participant_time))
+ if (participant && participant->getTime(participant_time))
{
has_time = true;
most_recent_time = llmax(most_recent_time,participant_time);
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index df16868132..65cec68884 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -696,10 +696,13 @@ void LLConversationViewParticipant::refresh()
{
// Refresh the participant view from its model data
LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem());
- participant_model->resetRefresh();
-
- // *TODO: We should also do something with vmi->isModerator() to echo that state in the UI somewhat
- mSpeakingIndicator->setIsModeratorMuted(participant_model->isModeratorMuted());
+ if (participant_model)
+ {
+ participant_model->resetRefresh();
+
+ // *TODO: We should also do something with vmi->isModerator() to echo that state in the UI somewhat
+ mSpeakingIndicator->setIsModeratorMuted(participant_model->isModeratorMuted());
+ }
// Do the regular upstream refresh
LLFolderViewItem::refresh();
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index d4fc1fe64d..232e461fd0 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -454,7 +454,7 @@ void LLCurrencyUIManager::Impl::updateUI()
if (!mUserEnteredCurrencyBuy)
{
- if (!mZeroMessage.empty() && mUserCurrencyBuy == 0)
+ if (mUserCurrencyBuy == 0)
{
lindenAmount->setText(LLStringUtil::null);
}
@@ -467,8 +467,9 @@ void LLCurrencyUIManager::Impl::updateUI()
}
}
- mPanel.getChild<LLUICtrl>("currency_est")->setTextArg("[LOCALAMOUNT]", getLocalEstimate());
- mPanel.getChildView("currency_est")->setVisible( hasEstimate() && mUserCurrencyBuy > 0);
+ std::string estimated = (mUserCurrencyBuy == 0) ? mPanel.getString("estimated_zero") : getLocalEstimate();
+ mPanel.getChild<LLUICtrl>("currency_est")->setTextArg("[LOCALAMOUNT]", estimated);
+ mPanel.getChildView("currency_est")->setVisible( hasEstimate() || mUserCurrencyBuy == 0);
mPanel.getChildView("currency_links")->setVisible( mSupportsInternationalBilling);
mPanel.getChildView("exchange_rate_note")->setVisible( mSupportsInternationalBilling);
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index b8e6e81ee6..01790ad19e 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -37,7 +37,7 @@
#include "llviewercontrol.h"
#include "llwin32headerslean.h"
-#if LL_LINUX || LL_SOLARIS || LL_DARWIN
+#if LL_LINUX || LL_DARWIN
# include "llfilepicker.h"
#endif
@@ -187,7 +187,7 @@ std::string LLDirPicker::getDirName()
return mFilePicker->getFirstFile();
}
-#elif LL_LINUX || LL_SOLARIS
+#elif LL_LINUX
LLDirPicker::LLDirPicker() :
mFileName(NULL),
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index c7dba12130..52febe4523 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -78,7 +78,7 @@ private:
void buildDirname( void );
bool check_local_file_access_enabled();
-#if LL_LINUX || LL_SOLARIS || LL_DARWIN
+#if LL_LINUX || LL_DARWIN
// On Linux we just implement LLDirPicker on top of LLFilePicker
LLFilePicker *mFilePicker;
#endif
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 5034bd1c5e..507af56cb0 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -912,22 +912,18 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
if (volume->getAvatar())
{
const LLVector3* av_box = volume->getAvatar()->getLastAnimExtents();
- LLVector3d cam_pos = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin());
- LLVector3 cam_region_pos = LLVector3(cam_pos - volume->getRegion()->getOriginGlobal());
-
- LLVector3 cam_to_box_offset = point_to_box_offset(cam_region_pos, av_box);
+ LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin();
+ LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box);
mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f));
LL_DEBUGS("DynamicBox") << volume->getAvatar()->getFullname()
<< " pos (ignored) " << pos
- << " cam pos " << cam_pos
- << " cam region pos " << cam_region_pos
+ << " cam pos " << cam_pos_from_agent
<< " box " << av_box[0] << "," << av_box[1]
<< " -> dist " << mDistanceWRTCamera
<< LL_ENDL;
mVObjp->updateLOD();
return;
}
-
}
else
{
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 55b3864b6d..687b13d2c8 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -2129,7 +2129,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
if (mat)
{
- switch (LLMaterial::eDiffuseAlphaMode(mat->getDiffuseAlphaModeRender()))
+ switch (LLMaterial::eDiffuseAlphaMode(mat->getDiffuseAlphaMode()))
{
case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
{
@@ -2267,7 +2267,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
sVertexProgram->uniform4f(LLShaderMgr::SPECULAR_COLOR, col.mV[0], col.mV[1], col.mV[2], spec);
sVertexProgram->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, env);
- if (mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
F32 cutoff = mat->getAlphaMaskCutoff()/255.f;
sVertexProgram->setMinimumAlpha(cutoff);
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index d4e7f1600e..0c3d8f3098 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -226,7 +226,7 @@ void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightL
}
}
-void LLDrawPoolWLSky::renderStars(void) const
+void LLDrawPoolWLSky::renderStars(const LLVector3& camPosLocal) const
{
LLGLSPipelineBlendSkyBox gls_skybox(true, false);
@@ -266,6 +266,7 @@ void LLDrawPoolWLSky::renderStars(void) const
}
gGL.pushMatrix();
+ gGL.translatef(camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]);
gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f);
if (LLGLSLShader::sNoFixedFunction)
{
@@ -296,7 +297,7 @@ void LLDrawPoolWLSky::renderStars(void) const
}
}
-void LLDrawPoolWLSky::renderStarsDeferred(void) const
+void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const
{
LLGLSPipelineBlendSkyBox gls_sky(true, false);
@@ -337,6 +338,8 @@ void LLDrawPoolWLSky::renderStarsDeferred(void) const
gGL.getTexUnit(1)->bind(tex_b);
}
+ gGL.pushMatrix();
+ gGL.translatef(camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]);
gDeferredStarProgram.uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
if (LLPipeline::sReflectionRender)
@@ -355,6 +358,8 @@ void LLDrawPoolWLSky::renderStarsDeferred(void) const
gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
gDeferredStarProgram.unbind();
+
+ gGL.popMatrix();
}
void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const
@@ -601,7 +606,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
if (gPipeline.canUseWindLightShaders())
{
renderSkyHazeDeferred(origin, camHeightLocal);
- renderStarsDeferred();
+ renderStarsDeferred(origin);
renderHeavenlyBodies();
renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader);
}
@@ -620,7 +625,7 @@ void LLDrawPoolWLSky::render(S32 pass)
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
renderSkyHaze(origin, camHeightLocal);
- renderStars();
+ renderStars(origin);
renderHeavenlyBodies();
renderSkyClouds(origin, camHeightLocal, cloud_shader);
diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h
index a4f176d6db..324886ed42 100644
--- a/indra/newview/lldrawpoolwlsky.h
+++ b/indra/newview/lldrawpoolwlsky.h
@@ -78,8 +78,8 @@ private:
void renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const;
void renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const;
- void renderStarsDeferred(void) const;
- void renderStars(void) const;
+ void renderStarsDeferred(const LLVector3& camPosLocal) const;
+ void renderStars(const LLVector3& camPosLocal) const;
void renderHeavenlyBodies();
};
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 89c20904c1..8b8273d183 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -56,13 +56,6 @@ LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 compon
{
llassert((1 <= components) && (components <= 4));
- if(gGLManager.mDebugGPU)
- {
- if(components == 3)
- {
- mComponents = 4 ; //convert to 32bits.
- }
- }
generateGLTexture();
llassert( 0 <= order && order < ORDER_COUNT );
@@ -211,7 +204,7 @@ void LLViewerDynamicTexture::postRender(BOOL success)
BOOL LLViewerDynamicTexture::updateAllInstances()
{
sNumRenders = 0;
- if (gGLManager.mIsDisabled || LLPipeline::sMemAllocationThrottled)
+ if (gGLManager.mIsDisabled)
{
return TRUE;
}
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 74c1b99e4d..190051d763 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -327,7 +327,7 @@ namespace
std::istringstream llsdData(llsdRaw);
if (!LLSDSerialize::deserialize(message, llsdData, llsdRaw.length()))
{
- LL_WARNS() << "LLExperienceLogDispatchHandler: Attempted to read parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
+ LL_WARNS() << "LLEnvironmentPushDispatchHandler: Attempted to read parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
}
}
@@ -785,11 +785,11 @@ namespace
}
//=========================================================================
-const F32Seconds LLEnvironment::TRANSITION_INSTANT(0.0f);
-const F32Seconds LLEnvironment::TRANSITION_FAST(1.0f);
-const F32Seconds LLEnvironment::TRANSITION_DEFAULT(5.0f);
-const F32Seconds LLEnvironment::TRANSITION_SLOW(10.0f);
-const F32Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
+const F64Seconds LLEnvironment::TRANSITION_INSTANT(0.0f);
+const F64Seconds LLEnvironment::TRANSITION_FAST(1.0f);
+const F64Seconds LLEnvironment::TRANSITION_DEFAULT(5.0f);
+const F64Seconds LLEnvironment::TRANSITION_SLOW(10.0f);
+const F64Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("01e41537-ff51-2f1f-8ef7-17e4df760bfb");
const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("6c83e853-e7f8-cad7-8ee6-5f31c453721c");
@@ -1217,28 +1217,24 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe
void LLEnvironment::setEnvironment(EnvSelection_t env, const LLUUID &assetId, S32 env_version)
{
- setEnvironment(env, assetId, LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET);
+ setEnvironment(env, assetId, TRANSITION_DEFAULT, env_version);
}
-
void LLEnvironment::setEnvironment(EnvSelection_t env,
const LLUUID &assetId,
- LLSettingsDay::Seconds daylength,
- LLSettingsDay::Seconds dayoffset,
+ LLSettingsBase::Seconds transition,
S32 env_version)
{
LLSettingsVOBase::getSettingsAsset(assetId,
- [this, env, daylength, dayoffset, env_version](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat)
+ [this, env, env_version, transition](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat)
{
- onSetEnvAssetLoaded(env, asset_id, settings, daylength, dayoffset, TRANSITION_DEFAULT, status, env_version);
+ onSetEnvAssetLoaded(env, asset_id, settings, transition, status, env_version);
});
}
void LLEnvironment::onSetEnvAssetLoaded(EnvSelection_t env,
LLUUID asset_id,
LLSettingsBase::ptr_t settings,
- LLSettingsDay::Seconds daylength,
- LLSettingsDay::Seconds dayoffset,
LLSettingsBase::Seconds transition,
S32 status,
S32 env_version)
@@ -1685,7 +1681,7 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
if (!envinfo->mDayCycle)
{
clearEnvironment(ENV_PARCEL);
- setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET, envinfo->mEnvVersion);
+ setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), TRANSITION_DEFAULT, envinfo->mEnvVersion);
updateEnvironment();
}
else if (envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_WATER)
@@ -1693,7 +1689,7 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
{
LL_WARNS("ENVIRONMENT") << "Invalid day cycle for region" << LL_ENDL;
clearEnvironment(ENV_PARCEL);
- setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET, envinfo->mEnvVersion);
+ setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), TRANSITION_DEFAULT, envinfo->mEnvVersion);
updateEnvironment();
}
else
@@ -2939,17 +2935,15 @@ bool LLEnvironment::loadFromSettings()
if (env_data.has("day_id"))
{
- LLSettingsDay::Seconds length = LLSettingsDay::Seconds(env_data["day_length"].asInteger());
- LLSettingsDay::Seconds offset = LLSettingsDay::Seconds(env_data["day_offset"].asInteger());
LLUUID assetId = env_data["day_id"].asUUID();
LLSettingsVOBase::getSettingsAsset(assetId,
- [this, length, offset, env_data](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat)
+ [this, env_data](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat)
{
// Day should be always applied first,
// otherwise it will override sky or water that was set earlier
// so wait for asset to load before applying sky/water
- onSetEnvAssetLoaded(ENV_LOCAL, asset_id, settings, length, offset, TRANSITION_DEFAULT, status, NO_VERSION);
+ onSetEnvAssetLoaded(ENV_LOCAL, asset_id, settings, TRANSITION_DEFAULT, status, NO_VERSION);
bool valid = false, has_assets = false;
loadSkyWaterFromSettings(env_data, valid, has_assets);
if (!has_assets && valid)
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 6ab0db7501..7cbf2d25bb 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -52,11 +52,11 @@ class LLEnvironment : public LLSingleton<LLEnvironment>
LOG_CLASS(LLEnvironment);
public:
- static const F32Seconds TRANSITION_INSTANT;
- static const F32Seconds TRANSITION_FAST;
- static const F32Seconds TRANSITION_DEFAULT;
- static const F32Seconds TRANSITION_SLOW;
- static const F32Seconds TRANSITION_ALTITUDE;
+ static const F64Seconds TRANSITION_INSTANT;
+ static const F64Seconds TRANSITION_FAST;
+ static const F64Seconds TRANSITION_DEFAULT;
+ static const F64Seconds TRANSITION_SLOW;
+ static const F64Seconds TRANSITION_ALTITUDE;
static const LLUUID KNOWN_SKY_SUNRISE;
static const LLUUID KNOWN_SKY_MIDDAY;
@@ -144,8 +144,8 @@ public:
void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed, S32 env_version = NO_VERSION) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t()), env_version); }
void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed, S32 env_version = NO_VERSION) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed), env_version); }
void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw, S32 env_version = NO_VERSION) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw), env_version); }
- void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, S32 env_version = NO_VERSION);
- void setEnvironment(EnvSelection_t env, const LLUUID &assetId, S32 env_version = NO_VERSION);
+ void setEnvironment(EnvSelection_t env, const LLUUID &assetId, S32 env_version);
+ void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, S32 env_version = NO_VERSION);
void setSharedEnvironment();
void clearEnvironment(EnvSelection_t env);
@@ -434,7 +434,7 @@ private:
void onAgentPositionHasChanged(const LLVector3 &localpos);
- void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, LLSettingsBase::Seconds transition, S32 status, S32 env_version);
+ void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsBase::Seconds transition, S32 status, S32 env_version);
void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes);
void handleEnvironmentPushClear(LLUUID experience_id, LLSD &message, F32 transition);
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 01d8b6775b..4a802ad9aa 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1165,7 +1165,7 @@ bool LLFace::canRenderAsMask()
}
LLMaterial* mat = te->getMaterialParams();
- if (mat && mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
+ if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
{
return false;
}
@@ -1412,7 +1412,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
else
{
- if (!mat || mat->getDiffuseAlphaModeRender() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
shiny_in_alpha = true;
}
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index ce2da94009..e33def5969 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -38,6 +38,7 @@
#include "lltooltip.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llavatarnamecache.h"
#include "llclipboard.h"
#include "llinventorybridge.h"
@@ -403,6 +404,8 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
mMoreTextBox = LLUICtrlFactory::create<LLTextBox> (more_button_params);
mMoreTextBox->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::onMoreTextBoxClicked, this));
addChild(mMoreTextBox);
+ LLRect rect = mMoreTextBox->getRect();
+ mMoreTextBox->setRect(LLRect(rect.mLeft - rect.getWidth(), rect.mTop, rect.mRight, rect.mBottom));
mDropDownItemsCount = 0;
@@ -1202,6 +1205,10 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata)
{
return isClipboardPasteable();
}
+ else if (param == "create_pick")
+ {
+ return !LLAgentPicksInfo::getInstance()->isPickLimitReached();
+ }
return false;
}
@@ -1250,6 +1257,13 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
LLFloaterReg::showInstance("world_map", "center");
}
}
+ else if (action == "create_pick")
+ {
+ LLSD args;
+ args["type"] = "create_pick";
+ args["item_id"] = item->getUUID();
+ LLFloaterSidePanelContainer::showPanel("places", args);
+ }
else if (action == "cut")
{
}
@@ -1265,6 +1279,20 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
{
gInventory.removeItem(mSelectedItemID);
}
+ else if (action == "rename")
+ {
+ LLSD args;
+ args["NAME"] = item->getName();
+
+ LLSD payload;
+ payload["id"] = mSelectedItemID;
+
+ LLNotificationsUtil::add("RenameLandmark", args, payload, boost::bind(onRenameCommit, _1, _2));
+ }
+ else if (action == "move_to_landmarks")
+ {
+ change_item_parent(mSelectedItemID, gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK));
+ }
// Pop-up the overflow menu again (it gets hidden whenever the user clicks a context menu item).
// See EXT-4217 and STORM-207.
@@ -1277,6 +1305,28 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
}
}
+bool LLFavoritesBarCtrl::onRenameCommit(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (0 == option)
+ {
+ LLUUID id = notification["payload"]["id"].asUUID();
+ LLInventoryItem *item = gInventory.getItem(id);
+ std::string landmark_name = response["new_name"].asString();
+ LLStringUtil::trim(landmark_name);
+
+ if (!landmark_name.empty() && item && item->getName() != landmark_name)
+ {
+ LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
+ new_item->rename(landmark_name);
+ new_item->updateServer(FALSE);
+ gInventory.updateItem(new_item);
+ }
+ }
+
+ return false;
+}
+
BOOL LLFavoritesBarCtrl::isClipboardPasteable() const
{
if (!LLClipboard::instance().hasContents())
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 868f1c83c8..3bb940948b 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -91,6 +91,7 @@ protected:
bool enableSelected(const LLSD& userdata);
void doToSelected(const LLSD& userdata);
+ static bool onRenameCommit(const LLSD& notification, const LLSD& response);
BOOL isClipboardPasteable() const;
void pasteFromClipboard() const;
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index dc9816c9f7..e6bbe234b3 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -755,12 +755,7 @@ void LLFeatureManager::applyBaseMasks()
maskFeatures("RAM256MB");
}
-#if LL_SOLARIS && defined(__sparc) // even low MHz SPARCs are fast
-#error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here?
- if (gSysCPU.getMHz() < 800)
-#else
if (gSysCPU.getMHz() < 1100)
-#endif
{
maskFeatures("CPUSlow");
}
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index b6fd70452e..3669fb1eeb 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -40,7 +40,7 @@
#include "llwindowsdl.h" // for some X/GTK utils to help with filepickers
#endif // LL_SDL
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX
#include "llhttpconstants.h" // file picker uses some of thes constants on Linux
#endif
@@ -939,7 +939,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
}
//END LL_DARWIN
-#elif LL_LINUX || LL_SOLARIS
+#elif LL_LINUX
# if LL_GTK
@@ -1504,4 +1504,4 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
return FALSE;
}
-#endif // LL_LINUX || LL_SOLARIS
+#endif // LL_LINUX
diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp
new file mode 100644
index 0000000000..3952b48229
--- /dev/null
+++ b/indra/newview/llfloateraddpaymentmethod.cpp
@@ -0,0 +1,81 @@
+/**
+ * @file llfloateraddpaymentmethod.cpp
+ * @brief LLFloaterAddPaymentMethod class implementation
+ *
+ * $LicenseInfo:firstyear=2020&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2020, 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 "llfloateraddpaymentmethod.h"
+#include "llnotificationsutil.h"
+#include "lluictrlfactory.h"
+#include "llweb.h"
+
+
+LLFloaterAddPaymentMethod::LLFloaterAddPaymentMethod(const LLSD& key)
+ : LLFloater(key)
+{
+}
+
+LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod()
+{
+}
+
+BOOL LLFloaterAddPaymentMethod::postBuild()
+{
+ setCanDrag(FALSE);
+ getChild<LLButton>("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this));
+ getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onCloseBtn, this));
+ return TRUE;
+}
+
+void LLFloaterAddPaymentMethod::onOpen(const LLSD& key)
+{
+ centerOnScreen();
+}
+
+void LLFloaterAddPaymentMethod::onContinueBtn()
+{
+ closeFloater();
+ LLNotificationsUtil::add("AddPaymentMethod", LLSD(), LLSD(),
+ [this](const LLSD&notif, const LLSD&resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ LLWeb::loadURL(this->getString("continue_url"));
+ }
+ });
+}
+
+void LLFloaterAddPaymentMethod::onCloseBtn()
+{
+ closeFloater();
+}
+
+void LLFloaterAddPaymentMethod::centerOnScreen()
+{
+ LLVector2 window_size = LLUI::getInstance()->getWindowSize();
+ centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY])));
+}
+
diff --git a/indra/newview/llfloateraddpaymentmethod.h b/indra/newview/llfloateraddpaymentmethod.h
new file mode 100644
index 0000000000..b3bb624484
--- /dev/null
+++ b/indra/newview/llfloateraddpaymentmethod.h
@@ -0,0 +1,52 @@
+/**
+ * @file llfloateraddpaymentmethod.h
+ * @brief LLFloaterAddPaymentMethod class definition
+ *
+ * $LicenseInfo:firstyear=2020&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2020, 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_ADDPAYMENTMETHOD_H
+#define LL_FLOATER_ADDPAYMENTMETHOD_H
+
+#include "llfloater.h"
+
+class LLFloaterAddPaymentMethod:
+ public LLFloater
+{
+ friend class LLFloaterReg;
+public:
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ LLFloaterAddPaymentMethod(const LLSD& key);
+
+ void centerOnScreen();
+
+ void onCloseBtn();
+ void onContinueBtn();
+
+ /*virtual*/ ~LLFloaterAddPaymentMethod();
+
+};
+
+#endif
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp
index 1751d54b5a..0cfac166c7 100644
--- a/indra/newview/llfloaterbuycurrency.cpp
+++ b/indra/newview/llfloaterbuycurrency.cpp
@@ -32,6 +32,8 @@
#include "llcurrencyuimanager.h"
#include "llfloater.h"
#include "llfloaterreg.h"
+#include "lllayoutstack.h"
+#include "lliconctrl.h"
#include "llnotificationsutil.h"
#include "llstatusbar.h"
#include "lltextbox.h"
@@ -42,7 +44,6 @@
#include "llwindow.h"
#include "llappviewer.h"
-static const S32 STANDARD_BUY_AMOUNT = 2000;
static const S32 MINIMUM_BALANCE_AMOUNT = 0;
class LLFloaterBuyCurrencyUI
@@ -58,8 +59,8 @@ public:
LLCurrencyUIManager mManager;
bool mHasTarget;
- std::string mTargetName;
S32 mTargetPrice;
+ S32 mRequiredAmount;
public:
void noTarget();
@@ -68,6 +69,7 @@ public:
virtual BOOL postBuild();
void updateUI();
+ void collapsePanels(bool collapse);
virtual void draw();
virtual BOOL canClose();
@@ -92,7 +94,9 @@ LLFloater* LLFloaterBuyCurrency::buildFloater(const LLSD& key)
LLFloaterBuyCurrencyUI::LLFloaterBuyCurrencyUI(const LLSD& key)
: LLFloater(key),
mChildren(*this),
- mManager(*this)
+ mManager(*this),
+ mHasTarget(false),
+ mTargetPrice(0)
{
}
@@ -104,15 +108,20 @@ LLFloaterBuyCurrencyUI::~LLFloaterBuyCurrencyUI()
void LLFloaterBuyCurrencyUI::noTarget()
{
mHasTarget = false;
- mManager.setAmount(STANDARD_BUY_AMOUNT);
+ mTargetPrice = 0;
+ mManager.setAmount(0);
}
void LLFloaterBuyCurrencyUI::target(const std::string& name, S32 price)
{
mHasTarget = true;
- mTargetName = name;
mTargetPrice = price;
+ if (!name.empty())
+ {
+ getChild<LLUICtrl>("target_price_label")->setValue(name);
+ }
+
S32 balance = gStatusBar->getBalance();
S32 need = price - balance;
if (need < 0)
@@ -120,7 +129,8 @@ void LLFloaterBuyCurrencyUI::target(const std::string& name, S32 price)
need = 0;
}
- mManager.setAmount(need + MINIMUM_BALANCE_AMOUNT);
+ mRequiredAmount = need + MINIMUM_BALANCE_AMOUNT;
+ mManager.setAmount(0);
}
@@ -175,7 +185,6 @@ void LLFloaterBuyCurrencyUI::updateUI()
getChildView("purchase_warning_repurchase")->setVisible(FALSE);
getChildView("purchase_warning_notenough")->setVisible(FALSE);
getChildView("contacting")->setVisible(FALSE);
- getChildView("buy_action")->setVisible(FALSE);
if (hasError)
{
@@ -209,8 +218,8 @@ void LLFloaterBuyCurrencyUI::updateUI()
{
if (mHasTarget)
{
- getChildView("buy_action")->setVisible( true);
- getChild<LLUICtrl>("buy_action")->setTextArg("[ACTION]", mTargetName);
+ getChild<LLUICtrl>("target_price")->setTextArg("[AMT]", llformat("%d", mTargetPrice));
+ getChild<LLUICtrl>("required_amount")->setTextArg("[AMT]", llformat("%d", mRequiredAmount));
}
}
@@ -231,18 +240,40 @@ void LLFloaterBuyCurrencyUI::updateUI()
if (mHasTarget)
{
- if (total >= mTargetPrice)
- {
- getChildView("purchase_warning_repurchase")->setVisible( true);
- }
- else
- {
- getChildView("purchase_warning_notenough")->setVisible( true);
- }
+ getChildView("purchase_warning_repurchase")->setVisible( !getChildView("currency_links")->getVisible());
}
}
- getChildView("getting_data")->setVisible( !mManager.canBuy() && !hasError);
+ getChildView("getting_data")->setVisible( !mManager.canBuy() && !hasError && !getChildView("currency_est")->getVisible());
+}
+
+void LLFloaterBuyCurrencyUI::collapsePanels(bool collapse)
+{
+ LLLayoutPanel* price_panel = getChild<LLLayoutPanel>("layout_panel_price");
+
+ if (price_panel->isCollapsed() == collapse)
+ return;
+
+ LLLayoutStack* outer_stack = getChild<LLLayoutStack>("outer_stack");
+ LLLayoutPanel* required_panel = getChild<LLLayoutPanel>("layout_panel_required");
+ LLLayoutPanel* msg_panel = getChild<LLLayoutPanel>("layout_panel_msg");
+
+ S32 delta_height = price_panel->getRect().getHeight() + required_panel->getRect().getHeight() + msg_panel->getRect().getHeight();
+ delta_height *= (collapse ? -1 : 1);
+
+ LLIconCtrl* icon = getChild<LLIconCtrl>("normal_background");
+ LLRect rect = icon->getRect();
+ icon->setRect(rect.setOriginAndSize(rect.mLeft, rect.mBottom - delta_height, rect.getWidth(), rect.getHeight() + delta_height));
+
+ outer_stack->collapsePanel(price_panel, collapse);
+ outer_stack->collapsePanel(required_panel, collapse);
+ outer_stack->collapsePanel(msg_panel, collapse);
+
+ outer_stack->updateLayout();
+
+ LLRect floater_rect = getRect();
+ floater_rect.mBottom -= delta_height;
+ setShape(floater_rect, false);
}
void LLFloaterBuyCurrencyUI::onClickBuy()
@@ -260,20 +291,72 @@ void LLFloaterBuyCurrencyUI::onClickCancel()
LLStatusBar::sendMoneyBalanceRequest();
}
+LLFetchAvatarPaymentInfo* LLFloaterBuyCurrency::sPropertiesRequest = NULL;
+
// static
void LLFloaterBuyCurrency::buyCurrency()
{
- LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency");
- ui->noTarget();
- ui->updateUI();
+ delete sPropertiesRequest;
+ sPropertiesRequest = new LLFetchAvatarPaymentInfo(false);
}
// static
void LLFloaterBuyCurrency::buyCurrency(const std::string& name, S32 price)
{
- LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency");
- ui->target(name, price);
- ui->updateUI();
+ delete sPropertiesRequest;
+ sPropertiesRequest = new LLFetchAvatarPaymentInfo(true, name, price);
+}
+
+// static
+void LLFloaterBuyCurrency::handleBuyCurrency(bool has_piof, bool has_target, const std::string name, S32 price)
+{
+ delete sPropertiesRequest;
+ sPropertiesRequest = NULL;
+
+ if (has_piof)
+ {
+ LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency");
+ if (has_target)
+ {
+ ui->target(name, price);
+ }
+ else
+ {
+ ui->noTarget();
+ }
+ ui->updateUI();
+ ui->collapsePanels(!has_target);
+ }
+ else
+ {
+ LLFloaterReg::showInstance("add_payment_method");
+ }
}
+LLFetchAvatarPaymentInfo::LLFetchAvatarPaymentInfo(bool has_target, const std::string& name, S32 price)
+: mAvatarID(gAgent.getID()),
+ mHasTarget(has_target),
+ mPrice(price),
+ mName(name)
+{
+ LLAvatarPropertiesProcessor* processor = LLAvatarPropertiesProcessor::getInstance();
+ // register ourselves as an observer
+ processor->addObserver(mAvatarID, this);
+ // send a request (duplicates will be suppressed inside the avatar
+ // properties processor)
+ processor->sendAvatarPropertiesRequest(mAvatarID);
+}
+
+LLFetchAvatarPaymentInfo::~LLFetchAvatarPaymentInfo()
+{
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this);
+}
+void LLFetchAvatarPaymentInfo::processProperties(void* data, EAvatarProcessorType type)
+{
+ if (data && type == APT_PROPERTIES)
+ {
+ LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
+ LLFloaterBuyCurrency::handleBuyCurrency(LLAvatarPropertiesProcessor::hasPaymentInfoOnFile(avatar_data), mHasTarget, mName, mPrice);
+ }
+}
diff --git a/indra/newview/llfloaterbuycurrency.h b/indra/newview/llfloaterbuycurrency.h
index 7ff6c42384..88d3d17cd6 100644
--- a/indra/newview/llfloaterbuycurrency.h
+++ b/indra/newview/llfloaterbuycurrency.h
@@ -27,15 +27,34 @@
#ifndef LL_LLFLOATERBUYCURRENCY_H
#define LL_LLFLOATERBUYCURRENCY_H
+#include "llavatarpropertiesprocessor.h"
#include "stdtypes.h"
-
+#include "llagent.h"
class LLFloater;
+class LLFetchAvatarPaymentInfo : public LLAvatarPropertiesObserver
+{
+public:
+ LLFetchAvatarPaymentInfo(bool has_target, const std::string& name = std::string(), S32 price = 0);
+ ~LLFetchAvatarPaymentInfo();
+
+ void processProperties(void* data, EAvatarProcessorType type);
+
+private:
+ LLUUID mAvatarID;
+ bool mHasTarget;
+ std::string mName;
+ S32 mPrice;
+};
+
+
class LLFloaterBuyCurrency
{
public:
static void buyCurrency();
static void buyCurrency(const std::string& name, S32 price);
+
+ static void handleBuyCurrency(bool has_piof, bool has_target, const std::string name, S32 price);
/* name should be a noun phrase of the object or service being bought:
"That object costs"
"Trying to give"
@@ -44,7 +63,8 @@ public:
*/
static LLFloater* buildFloater(const LLSD& key);
-};
+ static LLFetchAvatarPaymentInfo* sPropertiesRequest;
+};
#endif
diff --git a/indra/newview/llfloatercreatelandmark.cpp b/indra/newview/llfloatercreatelandmark.cpp
new file mode 100644
index 0000000000..eb93a6a75a
--- /dev/null
+++ b/indra/newview/llfloatercreatelandmark.cpp
@@ -0,0 +1,323 @@
+/**
+ * @file llfloatercreatelandmark.cpp
+ * @brief LLFloaterCreateLandmark class implementation
+ *
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2021, 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 "llfloatercreatelandmark.h"
+
+#include "llagent.h"
+#include "llagentui.h"
+#include "llcombobox.h"
+#include "llinventoryfunctions.h"
+#include "llinventoryobserver.h"
+#include "lllandmarkactions.h"
+#include "llnotificationsutil.h"
+#include "llpanellandmarkinfo.h"
+#include "llparcel.h"
+#include "lltextbox.h"
+#include "lltexteditor.h"
+#include "lluictrlfactory.h"
+#include "llviewermessage.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
+
+typedef std::pair<LLUUID, std::string> folder_pair_t;
+
+class LLLandmarksInventoryObserver : public LLInventoryAddedObserver
+{
+public:
+ LLLandmarksInventoryObserver(LLFloaterCreateLandmark* create_landmark_floater) :
+ mFloater(create_landmark_floater)
+ {}
+
+protected:
+ /*virtual*/ void done()
+ {
+ mFloater->setItem(gInventory.getAddedIDs());
+ }
+
+private:
+ LLFloaterCreateLandmark* mFloater;
+};
+
+LLFloaterCreateLandmark::LLFloaterCreateLandmark(const LLSD& key)
+ : LLFloater("add_landmark"),
+ mItem(NULL)
+{
+ mInventoryObserver = new LLLandmarksInventoryObserver(this);
+}
+
+LLFloaterCreateLandmark::~LLFloaterCreateLandmark()
+{
+ removeObserver();
+}
+
+BOOL LLFloaterCreateLandmark::postBuild()
+{
+ mFolderCombo = getChild<LLComboBox>("folder_combo");
+ mLandmarkTitleEditor = getChild<LLLineEditor>("title_editor");
+ mNotesEditor = getChild<LLTextEditor>("notes_editor");
+
+ getChild<LLTextBox>("new_folder_textbox")->setURLClickedCallback(boost::bind(&LLFloaterCreateLandmark::onCreateFolderClicked, this));
+ getChild<LLButton>("ok_btn")->setClickedCallback(boost::bind(&LLFloaterCreateLandmark::onSaveClicked, this));
+ getChild<LLButton>("cancel_btn")->setClickedCallback(boost::bind(&LLFloaterCreateLandmark::onCancelClicked, this));
+
+ mLandmarksID = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
+
+ return TRUE;
+}
+
+void LLFloaterCreateLandmark::removeObserver()
+{
+ if (gInventory.containsObserver(mInventoryObserver))
+ gInventory.removeObserver(mInventoryObserver);
+}
+
+void LLFloaterCreateLandmark::onOpen(const LLSD& key)
+{
+ LLUUID dest_folder = LLUUID();
+ if (key.has("dest_folder"))
+ {
+ dest_folder = key["dest_folder"].asUUID();
+ }
+ mItem = NULL;
+ gInventory.addObserver(mInventoryObserver);
+ setLandmarkInfo(dest_folder);
+ populateFoldersList(dest_folder);
+}
+
+void LLFloaterCreateLandmark::setLandmarkInfo(const LLUUID &folder_id)
+{
+ LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance();
+ LLParcel* parcel = parcel_mgr->getAgentParcel();
+ std::string name = parcel->getName();
+ LLVector3 agent_pos = gAgent.getPositionAgent();
+
+ if (name.empty())
+ {
+ S32 region_x = ll_round(agent_pos.mV[VX]);
+ S32 region_y = ll_round(agent_pos.mV[VY]);
+ S32 region_z = ll_round(agent_pos.mV[VZ]);
+
+ std::string region_name;
+ LLViewerRegion* region = parcel_mgr->getSelectionRegion();
+ if (region)
+ {
+ region_name = region->getName();
+ }
+ else
+ {
+ std::string desc;
+ LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_NORMAL, agent_pos);
+ region_name = desc;
+ }
+
+ mLandmarkTitleEditor->setText(llformat("%s (%d, %d, %d)",
+ region_name.c_str(), region_x, region_y, region_z));
+ }
+ else
+ {
+ mLandmarkTitleEditor->setText(name);
+ }
+
+ LLLandmarkActions::createLandmarkHere(name, "", folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE));
+}
+
+bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right)
+{
+ return left.second < right.second;
+}
+
+void LLFloaterCreateLandmark::populateFoldersList(const LLUUID &folder_id)
+{
+ // Collect all folders that can contain landmarks.
+ LLInventoryModel::cat_array_t cats;
+ LLPanelLandmarkInfo::collectLandmarkFolders(cats);
+
+ mFolderCombo->removeall();
+
+ // Put the "My Favorites" folder first in list.
+ LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id);
+ if (!favorites_cat)
+ {
+ LL_WARNS() << "Cannot find the favorites folder" << LL_ENDL;
+ }
+ else
+ {
+ mFolderCombo->add(getString("favorites_bar"), favorites_cat->getUUID());
+ }
+
+ // Add the "Landmarks" category.
+ const LLViewerInventoryCategory* lmcat = gInventory.getCategory(mLandmarksID);
+ if (!lmcat)
+ {
+ LL_WARNS() << "Cannot find the landmarks folder" << LL_ENDL;
+ }
+ else
+ {
+ std::string cat_full_name = LLPanelLandmarkInfo::getFullFolderName(lmcat);
+ mFolderCombo->add(cat_full_name, lmcat->getUUID());
+ }
+
+ typedef std::vector<folder_pair_t> folder_vec_t;
+ folder_vec_t folders;
+ // Sort the folders by their full name.
+ for (S32 i = 0; i < cats.size(); i++)
+ {
+ const LLViewerInventoryCategory* cat = cats.at(i);
+ std::string cat_full_name = LLPanelLandmarkInfo::getFullFolderName(cat);
+ folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name));
+ }
+ sort(folders.begin(), folders.end(), cmp_folders);
+
+ // Finally, populate the combobox.
+ for (folder_vec_t::const_iterator it = folders.begin(); it != folders.end(); it++)
+ mFolderCombo->add(it->second, LLSD(it->first));
+
+ if (folder_id.notNull())
+ {
+ mFolderCombo->setCurrentByID(folder_id);
+ }
+}
+
+void LLFloaterCreateLandmark::onCreateFolderClicked()
+{
+ LLNotificationsUtil::add("CreateLandmarkFolder", LLSD(), LLSD(),
+ [this](const LLSD&notif, const LLSD&resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ std::string folder_name = resp["message"].asString();
+ if (!folder_name.empty())
+ {
+ inventory_func_type func = boost::bind(&LLFloaterCreateLandmark::folderCreatedCallback, this, _1);
+ gInventory.createNewCategory(mLandmarksID, LLFolderType::FT_NONE, folder_name, func);
+ gInventory.notifyObservers();
+ }
+ }
+ });
+}
+
+void LLFloaterCreateLandmark::folderCreatedCallback(LLUUID folder_id)
+{
+ populateFoldersList(folder_id);
+}
+
+void LLFloaterCreateLandmark::onSaveClicked()
+{
+ if (mItem.isNull())
+ {
+ closeFloater();
+ return;
+ }
+
+
+ std::string current_title_value = mLandmarkTitleEditor->getText();
+ std::string item_title_value = mItem->getName();
+ std::string current_notes_value = mNotesEditor->getText();
+ std::string item_notes_value = mItem->getDescription();
+
+ LLStringUtil::trim(current_title_value);
+ LLStringUtil::trim(current_notes_value);
+
+ LLUUID item_id = mItem->getUUID();
+ LLUUID folder_id = mFolderCombo->getValue().asUUID();
+ bool change_parent = folder_id != mItem->getParentUUID();
+
+ LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(mItem);
+
+ if (!current_title_value.empty() &&
+ (item_title_value != current_title_value || item_notes_value != current_notes_value))
+ {
+ new_item->rename(current_title_value);
+ new_item->setDescription(current_notes_value);
+ LLPointer<LLInventoryCallback> cb;
+ if (change_parent)
+ {
+ cb = new LLUpdateLandmarkParent(new_item, folder_id);
+ }
+ LLInventoryModel::LLCategoryUpdate up(mItem->getParentUUID(), 0);
+ gInventory.accountForUpdate(up);
+ update_inventory_item(new_item, cb);
+ }
+ else if (change_parent)
+ {
+ LLInventoryModel::update_list_t update;
+ LLInventoryModel::LLCategoryUpdate old_folder(mItem->getParentUUID(),-1);
+ update.push_back(old_folder);
+ LLInventoryModel::LLCategoryUpdate new_folder(folder_id, 1);
+ update.push_back(new_folder);
+ gInventory.accountForUpdate(update);
+
+ new_item->setParent(folder_id);
+ new_item->updateParentOnServer(FALSE);
+ }
+
+ gInventory.updateItem(new_item);
+ gInventory.notifyObservers();
+
+ closeFloater();
+}
+
+void LLFloaterCreateLandmark::onCancelClicked()
+{
+ if (!mItem.isNull())
+ {
+ LLUUID item_id = mItem->getUUID();
+ remove_inventory_item(item_id, NULL);
+ }
+ closeFloater();
+}
+
+
+void LLFloaterCreateLandmark::setItem(const uuid_set_t& items)
+{
+ for (uuid_set_t::const_iterator item_iter = items.begin();
+ item_iter != items.end();
+ ++item_iter)
+ {
+ const LLUUID& item_id = (*item_iter);
+ if(!highlight_offered_object(item_id))
+ {
+ continue;
+ }
+
+ LLInventoryItem* item = gInventory.getItem(item_id);
+
+ llassert(item);
+ if (item && (LLAssetType::AT_LANDMARK == item->getType()) )
+ {
+ if(!getItem())
+ {
+ removeObserver();
+ mItem = item;
+ break;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/indra/newview/llfloatercreatelandmark.h b/indra/newview/llfloatercreatelandmark.h
new file mode 100644
index 0000000000..74ac5e651c
--- /dev/null
+++ b/indra/newview/llfloatercreatelandmark.h
@@ -0,0 +1,74 @@
+/**
+ * @file llfloatercreatelandmark.h
+ * @brief LLFloaterCreateLandmark class definition
+ *
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2021, 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_LLFLOATERCREATELANDMARK_H
+#define LL_LLFLOATERCREATELANDMARK_H
+
+#include "llfloater.h"
+
+class LLComboBox;
+class LLInventoryItem;
+class LLLineEditor;
+class LLTextEditor;
+class LLLandmarksInventoryObserver;
+
+class LLFloaterCreateLandmark:
+ public LLFloater
+{
+ friend class LLFloaterReg;
+
+public:
+
+ LLFloaterCreateLandmark(const LLSD& key);
+ ~LLFloaterCreateLandmark();
+
+ BOOL postBuild();
+ void onOpen(const LLSD& key);
+
+ void setItem(const uuid_set_t& items);
+
+ LLInventoryItem* getItem() { return mItem; }
+
+private:
+ void setLandmarkInfo(const LLUUID &folder_id);
+ void removeObserver();
+ void populateFoldersList(const LLUUID &folder_id = LLUUID::null);
+ void onCreateFolderClicked();
+ void onSaveClicked();
+ void onCancelClicked();
+
+ void folderCreatedCallback(LLUUID folder_id);
+
+ LLComboBox* mFolderCombo;
+ LLLineEditor* mLandmarkTitleEditor;
+ LLTextEditor* mNotesEditor;
+ LLUUID mLandmarksID;
+
+ LLLandmarksInventoryObserver* mInventoryObserver;
+ LLPointer<LLInventoryItem> mItem;
+};
+
+#endif
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index 4eb5e03603..95d6a2d652 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -53,11 +53,15 @@ namespace
const std::string FIELD_SKY_CLOUD_SCALE("cloud_scale");
const std::string FIELD_SKY_SCENE_GAMMA("scene_gamma");
const std::string FIELD_SKY_SUN_ROTATION("sun_rotation");
+ const std::string FIELD_SKY_SUN_AZIMUTH("sun_azimuth");
+ const std::string FIELD_SKY_SUN_ELEVATION("sun_elevation");
const std::string FIELD_SKY_SUN_SCALE("sun_scale");
const std::string FIELD_SKY_GLOW_FOCUS("glow_focus");
const std::string FIELD_SKY_GLOW_SIZE("glow_size");
const std::string FIELD_SKY_STAR_BRIGHTNESS("star_brightness");
const std::string FIELD_SKY_MOON_ROTATION("moon_rotation");
+ const std::string FIELD_SKY_MOON_AZIMUTH("moon_azimuth");
+ const std::string FIELD_SKY_MOON_ELEVATION("moon_elevation");
const std::string BTN_RESET("btn_reset");
const F32 SLIDER_SCALE_SUN_AMBIENT(3.0f);
@@ -96,9 +100,13 @@ BOOL LLFloaterEnvironmentAdjust::postBuild()
getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); });
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onStarBrightnessChanged(); });
getChild<LLUICtrl>(FIELD_SKY_SUN_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunRotationChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunAzimElevChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunAzimElevChanged(); });
getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunScaleChanged(); });
getChild<LLUICtrl>(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); });
getChild<LLUICtrl>(BTN_RESET)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onButtonReset(); });
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); });
@@ -169,10 +177,25 @@ void LLFloaterEnvironmentAdjust::refresh()
getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setValue(2.0 - (glow.mV[0] / SLIDER_SCALE_GLOW_R));
getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setValue(glow.mV[2] / SLIDER_SCALE_GLOW_B);
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setValue(mLiveSky->getStarBrightness());
- getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(mLiveSky->getSunRotation());
getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setValue(mLiveSky->getSunScale());
- getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->setRotation(mLiveSky->getMoonRotation());
+ // Sun rotation
+ LLQuaternion quat = mLiveSky->getSunRotation();
+ F32 azimuth;
+ F32 elevation;
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+
+ getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->setValue(elevation);
+ getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(quat);
+
+ // Moon rotation
+ quat = mLiveSky->getMoonRotation();
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+
+ getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->setValue(elevation);
+ getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->setRotation(quat);
}
@@ -325,10 +348,45 @@ void LLFloaterEnvironmentAdjust::onStarBrightnessChanged()
void LLFloaterEnvironmentAdjust::onSunRotationChanged()
{
- if (!mLiveSky)
- return;
- mLiveSky->setSunRotation(getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->getRotation());
- mLiveSky->update();
+ LLQuaternion quat = getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->getRotation();
+ F32 azimuth;
+ F32 elevation;
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+ getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->setValue(elevation);
+ if (mLiveSky)
+ {
+ mLiveSky->setSunRotation(quat);
+ mLiveSky->update();
+ }
+}
+
+void LLFloaterEnvironmentAdjust::onSunAzimElevChanged()
+{
+ F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
+ F32 elevation = getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
+ LLQuaternion quat;
+
+ azimuth *= DEG_TO_RAD;
+ elevation *= DEG_TO_RAD;
+
+ if (is_approx_zero(elevation))
+ {
+ elevation = F_APPROXIMATELY_ZERO;
+ }
+
+ quat.setAngleAxis(-elevation, 0, 1, 0);
+ LLQuaternion az_quat;
+ az_quat.setAngleAxis(F_TWO_PI - azimuth, 0, 0, 1);
+ quat *= az_quat;
+
+ getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(quat);
+
+ if (mLiveSky)
+ {
+ mLiveSky->setSunRotation(quat);
+ mLiveSky->update();
+ }
}
void LLFloaterEnvironmentAdjust::onSunScaleChanged()
@@ -341,10 +399,45 @@ void LLFloaterEnvironmentAdjust::onSunScaleChanged()
void LLFloaterEnvironmentAdjust::onMoonRotationChanged()
{
- if (!mLiveSky)
- return;
- mLiveSky->setMoonRotation(getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->getRotation());
- mLiveSky->update();
+ LLQuaternion quat = getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->getRotation();
+ F32 azimuth;
+ F32 elevation;
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+ getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->setValue(elevation);
+ if (mLiveSky)
+ {
+ mLiveSky->setMoonRotation(quat);
+ mLiveSky->update();
+ }
+}
+
+void LLFloaterEnvironmentAdjust::onMoonAzimElevChanged()
+{
+ F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
+ F32 elevation = getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
+ LLQuaternion quat;
+
+ azimuth *= DEG_TO_RAD;
+ elevation *= DEG_TO_RAD;
+
+ if (is_approx_zero(elevation))
+ {
+ elevation = F_APPROXIMATELY_ZERO;
+ }
+
+ quat.setAngleAxis(-elevation, 0, 1, 0);
+ LLQuaternion az_quat;
+ az_quat.setAngleAxis(F_TWO_PI - azimuth, 0, 0, 1);
+ quat *= az_quat;
+
+ getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->setRotation(quat);
+
+ if (mLiveSky)
+ {
+ mLiveSky->setMoonRotation(quat);
+ mLiveSky->update();
+ }
}
void LLFloaterEnvironmentAdjust::onCloudMapChanged()
diff --git a/indra/newview/llfloaterenvironmentadjust.h b/indra/newview/llfloaterenvironmentadjust.h
index cb38dbcfa8..05ff011be5 100644
--- a/indra/newview/llfloaterenvironmentadjust.h
+++ b/indra/newview/llfloaterenvironmentadjust.h
@@ -73,9 +73,11 @@ private:
void onGlowChanged();
void onStarBrightnessChanged();
void onSunRotationChanged();
+ void onSunAzimElevChanged();
void onSunScaleChanged();
void onMoonRotationChanged();
+ void onMoonAzimElevChanged();
void onCloudMapChanged();
void onWaterMapChanged();
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 41bbd5e8f9..4f2c36f45b 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -128,7 +128,7 @@ void LLFloaterFixedEnvironment::onOpen(const LLSD& key)
updateEditEnvironment();
syncronizeTabs();
refresh();
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_FAST);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT);
}
@@ -180,7 +180,7 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
updateEditEnvironment();
syncronizeTabs();
refresh();
- LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_FAST);
+ LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
}
void LLFloaterFixedEnvironment::syncronizeTabs()
@@ -460,7 +460,7 @@ void LLFloaterFixedEnvironmentWater::loadWaterSettingFromFile(const std::vector<
setDirtyFlag();
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, legacywater);
setEditSettings(legacywater);
- LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_FAST, true);
+ LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true);
}
//=========================================================================
@@ -548,7 +548,7 @@ void LLFloaterFixedEnvironmentSky::loadSkySettingFromFile(const std::vector<std:
setDirtyFlag();
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, legacysky);
setEditSettings(legacysky);
- LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_FAST, true);
+ LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true);
}
//=========================================================================
diff --git a/indra/newview/llfloaterhandler.cpp b/indra/newview/llfloaterhandler.cpp
index e2160498e9..8ebb14149c 100644
--- a/indra/newview/llfloaterhandler.cpp
+++ b/indra/newview/llfloaterhandler.cpp
@@ -26,6 +26,7 @@
#include "llfloater.h"
#include "llmediactrl.h"
+#include "llfloaterreg.h"
// register with dispatch via global object
LLFloaterHandler gFloaterHandler;
@@ -50,9 +51,15 @@ LLFloater* get_parent_floater(LLView* view)
bool LLFloaterHandler::handle(const LLSD &params, const LLSD &query_map, LLMediaCtrl *web)
{
- if (params.size() < 2) return false;
+ if (params.size() < 1) return false;
LLFloater* floater = NULL;
// *TODO: implement floater lookup by name
+
+ if (params[0].asString() == "destinations")
+ {
+ LLFloaterReg::toggleInstanceOrBringToFront("destinations");
+ return true;
+ }
if (params[0].asString() == "self")
{
if (web)
diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp
new file mode 100644
index 0000000000..a359fb7c7d
--- /dev/null
+++ b/indra/newview/llfloaterhowto.cpp
@@ -0,0 +1,92 @@
+/**
+ * @file llfloaterhowto.cpp
+ * @brief A variant of web floater meant to open guidebook
+ *
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2021, 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 "llfloaterhowto.h"
+
+#include "llfloaterreg.h"
+#include "llviewercontrol.h"
+#include "llweb.h"
+
+
+const S32 STACK_WIDTH = 300;
+const S32 STACK_HEIGHT = 505; // content will be 500
+
+LLFloaterHowTo::LLFloaterHowTo(const Params& key) :
+ LLFloaterWebContent(key)
+{
+ mShowPageTitle = false;
+}
+
+BOOL LLFloaterHowTo::postBuild()
+{
+ LLFloaterWebContent::postBuild();
+
+ return TRUE;
+}
+
+void LLFloaterHowTo::onOpen(const LLSD& key)
+{
+ LLFloaterWebContent::Params p(key);
+ if (!p.url.isProvided() || p.url.getValue().empty())
+ {
+ std::string url = gSavedSettings.getString("GuidebookURL");
+ p.url = LLWeb::expandURLSubstitutions(url, LLSD());
+ }
+ p.show_chrome = false;
+
+ LLFloaterWebContent::onOpen(p);
+
+ if (p.preferred_media_size().isEmpty())
+ {
+ // Elements from LLFloaterWebContent did not pick up restored size (save_rect) of LLFloaterHowTo
+ // set the stack size and position (alternative to preferred_media_size)
+ LLLayoutStack *stack = getChild<LLLayoutStack>("stack1");
+ LLRect stack_rect = stack->getRect();
+ stack->reshape(STACK_WIDTH, STACK_HEIGHT);
+ stack->setOrigin(stack_rect.mLeft, stack_rect.mTop - STACK_HEIGHT);
+ stack->updateLayout();
+ }
+}
+
+LLFloaterHowTo* LLFloaterHowTo::getInstance()
+{
+ return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("guidebook");
+}
+
+BOOL LLFloaterHowTo::handleKeyHere(KEY key, MASK mask)
+{
+ BOOL handled = FALSE;
+
+ if (KEY_F1 == key )
+ {
+ closeFloater();
+ handled = TRUE;
+ }
+
+ return handled;
+}
diff --git a/indra/newview/llfloaterhowto.h b/indra/newview/llfloaterhowto.h
new file mode 100644
index 0000000000..d8da355600
--- /dev/null
+++ b/indra/newview/llfloaterhowto.h
@@ -0,0 +1,58 @@
+/**
+ * @file llfloaterhowto.h
+ * @brief A variant of web floater meant to open guidebook
+ *
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2021, 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_LLFLOATERHOWTO_H
+#define LL_LLFLOATERHOWTO_H
+
+#include "llfloaterwebcontent.h"
+
+class LLMediaCtrl;
+
+
+class LLFloaterHowTo :
+ public LLFloaterWebContent
+{
+public:
+ LOG_CLASS(LLFloaterHowTo);
+
+ typedef LLFloaterWebContent::Params Params;
+
+ LLFloaterHowTo(const Params& key);
+
+ void onOpen(const LLSD& key) override;
+
+ BOOL handleKeyHere(KEY key, MASK mask) override;
+
+ static LLFloaterHowTo* getInstance();
+
+ bool matchesKey(const LLSD& key) override { return true; /*single instance*/ };
+
+private:
+ BOOL postBuild() override;
+};
+
+#endif // LL_LLFLOATERHOWTO_H
+
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 8d38a5743b..9c84fa1991 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -59,7 +59,9 @@
#include "boost/foreach.hpp"
-const S32 EVENTS_PER_IDLE_LOOP = 100;
+const S32 EVENTS_PER_IDLE_LOOP_CURRENT_SESSION = 80;
+const S32 EVENTS_PER_IDLE_LOOP_BACKGROUND = 40;
+const F32 EVENTS_PER_IDLE_LOOP_MIN_PERCENTAGE = 0.01f; // process a minimum of 1% of total events per frame
//
// LLFloaterIMContainer
@@ -426,8 +428,11 @@ void LLFloaterIMContainer::processParticipantsStyleUpdate()
while (current_participant_model != end_participant_model)
{
LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model);
- // Get the avatar name for this participant id from the cache and update the model
- participant_model->updateName();
+ if (participant_model)
+ {
+ // Get the avatar name for this participant id from the cache and update the model
+ participant_model->updateName();
+ }
// Next participant
current_participant_model++;
}
@@ -474,8 +479,11 @@ void LLFloaterIMContainer::idleUpdate()
while (current_participant_model != end_participant_model)
{
LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model);
- participant_model->setModeratorOptionsVisible(is_moderator);
- participant_model->setGroupBanVisible(can_ban && participant_model->getUUID() != gAgentID);
+ if (participant_model)
+ {
+ participant_model->setModeratorOptionsVisible(is_moderator);
+ participant_model->setGroupBanVisible(can_ban && participant_model->getUUID() != gAgentID);
+ }
current_participant_model++;
}
@@ -508,20 +516,49 @@ void LLFloaterIMContainer::idleUpdate()
void LLFloaterIMContainer::idleProcessEvents()
{
- if (!mConversationEventQueue.empty())
- {
- S32 events_to_handle = llmin((S32)mConversationEventQueue.size(), EVENTS_PER_IDLE_LOOP);
- for (S32 i = 0; i < events_to_handle; i++)
- {
- handleConversationModelEvent(mConversationEventQueue.back());
- mConversationEventQueue.pop_back();
- }
- }
+ LLUUID current_session_id = getSelectedSession();
+ conversations_items_deque::iterator iter = mConversationEventQueue.begin();
+ conversations_items_deque::iterator end = mConversationEventQueue.end();
+ while (iter != end)
+ {
+ std::deque<LLSD> &events = iter->second;
+ if (!events.empty())
+ {
+ S32 events_to_handle;
+ S32 query_size = (S32)events.size();
+ if (current_session_id == iter->first)
+ {
+ events_to_handle = EVENTS_PER_IDLE_LOOP_CURRENT_SESSION;
+ }
+ else
+ {
+ events_to_handle = EVENTS_PER_IDLE_LOOP_BACKGROUND;
+ }
+
+ if (events_to_handle <= query_size)
+ {
+ // Some groups can be very large and can generate huge amount of updates, scale processing up to keep up
+ events_to_handle = llmax(events_to_handle, (S32)(query_size * EVENTS_PER_IDLE_LOOP_MIN_PERCENTAGE));
+ }
+ else
+ {
+ events_to_handle = query_size;
+ }
+
+ for (S32 i = 0; i < events_to_handle; i++)
+ {
+ handleConversationModelEvent(events.back());
+ events.pop_back();
+ }
+ }
+ iter++;
+ }
}
bool LLFloaterIMContainer::onConversationModelEvent(const LLSD& event)
{
- mConversationEventQueue.push_front(event);
+ LLUUID id = event.get("session_uuid").asUUID();
+ mConversationEventQueue[id].push_front(event);
return true;
}
@@ -1834,6 +1871,8 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
// Suppress the conversation items and widgets from their respective maps
mConversationsItems.erase(uuid);
mConversationsWidgets.erase(uuid);
+ // Clear event query (otherwise reopening session in some way can bombard session with stale data)
+ mConversationEventQueue.erase(uuid);
// Don't let the focus fall IW, select and refocus on the first conversation in the list
if (change_focus)
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 468b47f1f1..b4a9d377ab 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -229,9 +229,10 @@ private:
conversations_widgets_map mConversationsWidgets;
LLConversationViewModel mConversationViewModel;
LLFolderView* mConversationsRoot;
- LLEventStream mConversationsEventStream;
+ LLEventStream mConversationsEventStream;
- std::deque<LLSD> mConversationEventQueue;
+ typedef std::map<LLUUID, std::deque<LLSD> > conversations_items_deque;
+ conversations_items_deque mConversationEventQueue;
LLTimer mParticipantRefreshTimer;
};
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index a6531ed7e1..3a850d4b68 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -67,6 +67,7 @@
#include "llviewerchat.h"
#include "lltranslate.h"
#include "llautoreplace.h"
+#include "lluiusage.h"
S32 LLFloaterIMNearbyChat::sLastSpecialChatChannel = 0;
@@ -697,6 +698,7 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, ECha
void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
{
+ LLUIUsage::instance().logCommand("Chat.Send"); // pseuo-command
// Look for "/20 foo" channel chats.
S32 channel = 0;
LLWString out_text = stripChannelNumber(wtext, &channel);
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index e7f428c06a..7541bb5efe 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -497,7 +497,10 @@ void LLFloaterIMSessionTab::buildConversationViewParticipant()
while (current_participant_model != end_participant_model)
{
LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model);
- addConversationViewParticipant(participant_model);
+ if (participant_model)
+ {
+ addConversationViewParticipant(participant_model);
+ }
current_participant_model++;
}
}
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index f34760a6bf..749a3d2686 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -51,6 +51,9 @@
#include "llgroupactions.h"
+const std::string LINDEN_HOMES_SKU = "131";
+bool LLFloaterLandHoldings::sHasLindenHome = false;
+
// protected
LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key)
: LLFloater(key),
@@ -148,10 +151,24 @@ void LLFloaterLandHoldings::refresh()
void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
{
LLFloaterLandHoldings* self = LLFloaterReg::findTypedInstance<LLFloaterLandHoldings>("land_holdings");
-
- // Is this packet from an old, closed window?
+ S32 count = msg->getNumberOfBlocks("QueryData");
+ std::string land_sku;
+ sHasLindenHome = false;
if (!self)
{
+ for (S32 i = 0; i < count; i++)
+ {
+ if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 )
+ {
+ msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i);
+
+ if (LINDEN_HOMES_SKU == land_sku)
+ {
+ sHasLindenHome = true;
+ return;
+ }
+ }
+ }
return;
}
@@ -174,12 +191,9 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
F32 global_x;
F32 global_y;
std::string sim_name;
- std::string land_sku;
std::string land_type;
- S32 i;
- S32 count = msg->getNumberOfBlocks("QueryData");
- for (i = 0; i < count; i++)
+ for (S32 i = 0; i < count; i++)
{
msg->getUUID("QueryData", "OwnerID", owner_id, i);
msg->getString("QueryData", "Name", name, i);
@@ -196,6 +210,10 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i);
LL_INFOS() << "Land sku: " << land_sku << LL_ENDL;
land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku);
+ if (LINDEN_HOMES_SKU == land_sku)
+ {
+ sHasLindenHome = true;
+ }
}
else
{
diff --git a/indra/newview/llfloaterlandholdings.h b/indra/newview/llfloaterlandholdings.h
index d1d510bb40..90e75b1062 100644
--- a/indra/newview/llfloaterlandholdings.h
+++ b/indra/newview/llfloaterlandholdings.h
@@ -57,6 +57,8 @@ public:
static void onGrantList(void* data);
+ static bool sHasLindenHome;
+
protected:
void refreshAggregates();
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 999e4a9582..d9edd4dc30 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -911,7 +911,7 @@ BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
LLFloaterModelUploadBase::handleScrollWheel(x, y, clicks);
}
- return TRUE;
+ return TRUE;
}
/*virtual*/
@@ -1292,47 +1292,47 @@ void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handl
void LLFloaterModelPreview::addStringToLog(const std::string& message, const LLSD& args, bool flash, S32 lod)
{
if (sInstance && sInstance->hasString(message))
- {
+ {
std::string str;
switch (lod)
- {
+{
case LLModel::LOD_IMPOSTOR: str = "LOD0 "; break;
case LLModel::LOD_LOW: str = "LOD1 "; break;
case LLModel::LOD_MEDIUM: str = "LOD2 "; break;
case LLModel::LOD_PHYSICS: str = "PHYS "; break;
case LLModel::LOD_HIGH: str = "LOD3 "; break;
default: break;
- }
-
+}
+
LLStringUtil::format_map_t args_msg;
LLSD::map_const_iterator iter = args.beginMap();
LLSD::map_const_iterator end = args.endMap();
for (; iter != end; ++iter)
- {
+{
args_msg[iter->first] = iter->second.asString();
- }
+ }
str += sInstance->getString(message, args_msg);
sInstance->addStringToLogTab(str, flash);
- }
-}
+ }
+ }
// static
void LLFloaterModelPreview::addStringToLog(const std::string& str, bool flash)
-{
+ {
if (sInstance)
- {
+ {
sInstance->addStringToLogTab(str, flash);
- }
-}
+ }
+ }
// static
void LLFloaterModelPreview::addStringToLog(const std::ostringstream& strm, bool flash)
-{
+ {
if (sInstance)
- {
+ {
sInstance->addStringToLogTab(strm.str(), flash);
- }
-}
+ }
+ }
void LLFloaterModelPreview::clearAvatarTab()
{
@@ -1343,9 +1343,9 @@ void LLFloaterModelPreview::clearAvatarTab()
joints_pos->deleteAllItems(); mSelectedJointName.clear();
for (U32 i = 0; i < LLModel::NUM_LODS; ++i)
- {
+{
mJointOverrides[i].clear();
- }
+ }
LLTextBox *joint_total_descr = panel->getChild<LLTextBox>("conflicts_description");
joint_total_descr->setTextArg("[CONFLICTS]", llformat("%d", 0));
@@ -1354,34 +1354,34 @@ void LLFloaterModelPreview::clearAvatarTab()
LLTextBox *joint_pos_descr = panel->getChild<LLTextBox>("pos_overrides_descr");
joint_pos_descr->setTextArg("[JOINT]", std::string("mPelvis")); // Might be better to hide it
-}
+ }
void LLFloaterModelPreview::updateAvatarTab(bool highlight_overrides)
-{
+ {
S32 display_lod = mModelPreview->mPreviewLOD;
if (mModelPreview->mModel[display_lod].empty())
- {
+ {
mSelectedJointName.clear();
return;
- }
+ }
// Joints will be listed as long as they are listed in mAlternateBindMatrix
// even if they are for some reason identical to defaults.
// Todo: Are overrides always identical for all lods? They normally are, but there might be situations where they aren't.
if (mJointOverrides[display_lod].empty())
- {
+ {
// populate map
for (LLModelLoader::scene::iterator iter = mModelPreview->mScene[display_lod].begin(); iter != mModelPreview->mScene[display_lod].end(); ++iter)
- {
+ {
for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_iter)
- {
+ {
LLModelInstance& instance = *model_iter;
LLModel* model = instance.mModel;
const LLMeshSkinInfo *skin = &model->mSkinInfo;
U32 joint_count = LLSkinningUtil::getMeshJointCount(skin);
U32 bind_count = highlight_overrides ? skin->mAlternateBindMatrix.size() : 0; // simply do not include overrides if data is not needed
if (bind_count > 0 && bind_count != joint_count)
- {
+ {
std::ostringstream out;
out << "Invalid joint overrides for model " << model->getName();
out << ". Amount of joints " << joint_count;
@@ -1390,68 +1390,68 @@ void LLFloaterModelPreview::updateAvatarTab(bool highlight_overrides)
addStringToLog(out.str(), true);
// Disable overrides for this model
bind_count = 0;
- }
+ }
if (bind_count > 0)
- {
+ {
for (U32 j = 0; j < joint_count; ++j)
- {
+ {
const LLVector3& joint_pos = skin->mAlternateBindMatrix[j].getTranslation();
LLJointOverrideData &data = mJointOverrides[display_lod][skin->mJointNames[j]];
LLJoint* pJoint = LLModelPreview::lookupJointByName(skin->mJointNames[j], mModelPreview);
if (pJoint)
- {
+ {
// see how voavatar uses aboveJointPosThreshold
if (pJoint->aboveJointPosThreshold(joint_pos))
- {
+ {
// valid override
if (data.mPosOverrides.size() > 0
&& (data.mPosOverrides.begin()->second - joint_pos).lengthSquared() > (LL_JOINT_TRESHOLD_POS_OFFSET * LL_JOINT_TRESHOLD_POS_OFFSET))
- {
+ {
// File contains multiple meshes with conflicting joint offsets
// preview may be incorrect, upload result might wary (depends onto
// mesh_id that hasn't been generated yet).
data.mHasConflicts = true;
- }
+ }
data.mPosOverrides[model->getName()] = joint_pos;
- }
- else
- {
+ }
+ else
+ {
// default value, it won't be accounted for by avatar
data.mModelsNoOverrides.insert(model->getName());
- }
- }
- }
- }
- else
- {
+ }
+ }
+ }
+ }
+ else
+ {
for (U32 j = 0; j < joint_count; ++j)
- {
+ {
LLJointOverrideData &data = mJointOverrides[display_lod][skin->mJointNames[j]];
data.mModelsNoOverrides.insert(model->getName());
}
}
- }
- }
- }
+ }
+ }
+ }
LLPanel *panel = mTabContainer->getPanelByName("rigging_panel");
LLScrollListCtrl *joints_list = panel->getChild<LLScrollListCtrl>("joints_list");
if (joints_list->isEmpty())
- {
+ {
// Populate table
- std::map<std::string, std::string> joint_alias_map;
+ std::map<std::string, std::string> joint_alias_map;
mModelPreview->getJointAliases(joint_alias_map);
-
+
S32 conflicts = 0;
joint_override_data_map_t::iterator joint_iter = mJointOverrides[display_lod].begin();
joint_override_data_map_t::iterator joint_end = mJointOverrides[display_lod].end();
while (joint_iter != joint_end)
- {
+ {
const std::string& listName = joint_iter->first;
-
+
LLScrollListItem::Params item_params;
item_params.value(listName);
@@ -1459,38 +1459,38 @@ void LLFloaterModelPreview::updateAvatarTab(bool highlight_overrides)
cell_params.font = LLFontGL::getFontSansSerif();
cell_params.value = listName;
if (joint_alias_map.find(listName) == joint_alias_map.end())
- {
+ {
// Missing names
cell_params.color = LLColor4::red;
- }
+ }
if (joint_iter->second.mHasConflicts)
- {
+ {
// Conflicts
cell_params.color = LLColor4::orange;
conflicts++;
- }
+ }
if (highlight_overrides && joint_iter->second.mPosOverrides.size() > 0)
- {
+ {
cell_params.font.style = "BOLD";
- }
+ }
item_params.columns.add(cell_params);
joints_list->addRow(item_params, ADD_BOTTOM);
joint_iter++;
- }
+ }
joints_list->selectFirstItem();
LLScrollListItem *selected = joints_list->getFirstSelected();
if (selected)
- {
+{
mSelectedJointName = selected->getValue().asString();
- }
+ }
LLTextBox *joint_conf_descr = panel->getChild<LLTextBox>("conflicts_description");
joint_conf_descr->setTextArg("[CONFLICTS]", llformat("%d", conflicts));
joint_conf_descr->setTextArg("[JOINTS_COUNT]", llformat("%d", mJointOverrides[display_lod].size()));
- }
-}
+ }
+ }
//-----------------------------------------------------------------------------
// addStringToLogTab()
@@ -1498,52 +1498,52 @@ void LLFloaterModelPreview::updateAvatarTab(bool highlight_overrides)
void LLFloaterModelPreview::addStringToLogTab(const std::string& str, bool flash)
{
if (str.empty())
- {
- return;
- }
+ {
+ return;
+ }
LLWString text = utf8str_to_wstring(str);
S32 add_text_len = text.length() + 1; // newline
S32 editor_max_len = mUploadLogText->getMaxTextLength();
if (add_text_len > editor_max_len)
- {
- return;
- }
+ {
+ return;
+ }
// Make sure we have space for new string
S32 editor_text_len = mUploadLogText->getLength();
if (editor_max_len < (editor_text_len + add_text_len)
&& mUploadLogText->getLineCount() <= 0)
- {
+ {
mUploadLogText->getTextBoundingRect();// forces a reflow() to fix line count
- }
+ }
while (editor_max_len < (editor_text_len + add_text_len))
- {
+ {
S32 shift = mUploadLogText->removeFirstLine();
if (shift > 0)
- {
+ {
// removed a line
editor_text_len -= shift;
- }
- else
- {
+}
+ else
+ {
//nothing to remove?
LL_WARNS() << "Failed to clear log lines" << LL_ENDL;
- break;
- }
- }
+ break;
+ }
+ }
mUploadLogText->appendText(str, true);
if (flash)
- {
+ {
LLPanel* panel = mTabContainer->getPanelByName("logs_panel");
if (mTabContainer->getCurrentPanel() != panel)
- {
+ {
mTabContainer->setTabPanelFlashing(panel, true);
- }
- }
-}
+ }
+ }
+ }
void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost)
{
@@ -1551,15 +1551,15 @@ void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost,
childSetTextArg("import_dimensions", "[X]", llformat("%.3f", x));
childSetTextArg("import_dimensions", "[Y]", llformat("%.3f", y));
childSetTextArg("import_dimensions", "[Z]", llformat("%.3f", z));
-}
+ }
void LLFloaterModelPreview::setPreviewLOD(S32 lod)
-{
+ {
if (mModelPreview)
{
mModelPreview->setPreviewLOD(lod);
- }
-}
+ }
+ }
void LLFloaterModelPreview::onBrowseLOD(S32 lod)
{
@@ -1648,13 +1648,13 @@ void LLFloaterModelPreview::setCtrlLoadFromFile(S32 lod)
}
}
else
- {
+{
LLComboBox* lod_combo = findChild<LLComboBox>("lod_source_" + lod_name[lod]);
if (lod_combo)
- {
+ {
lod_combo->setCurrentByIndex(0);
- }
- }
+ }
+}
}
void LLFloaterModelPreview::setStatusMessage(const std::string& msg)
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 7bfba2a6d7..a30c73768d 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -746,9 +746,6 @@ LLSD LLFloaterReporter::gatherReport()
const char* platform = "Mac";
#elif LL_LINUX
const char* platform = "Lnx";
-#elif LL_SOLARIS
- const char* platform = "Sol";
- const char* short_platform = "O:S";
#else
const char* platform = "???";
#endif
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 06a908cccc..51b98339c4 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -45,6 +45,7 @@ public:
virtual LLFolderType::EType getPreferredType() const = 0;
virtual void showProperties(void) = 0;
virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual.
+ virtual BOOL isAgentInventory() const { return FALSE; }
virtual BOOL isUpToDate() const = 0;
virtual bool hasChildren() const = 0;
virtual LLInventoryType::EType getInventoryType() const = 0;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index d35d8456be..8b61e6c61a 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1835,28 +1835,11 @@ void LLItemBridge::restoreToWorld()
void LLItemBridge::gotoItem()
{
- LLInventoryObject *obj = getInventoryObject();
- if (obj && obj->getIsLinkType())
- {
- const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
- if (gInventory.isObjectDescendentOf(obj->getLinkedUUID(), inbox_id))
- {
- LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- if (sidepanel_inventory && sidepanel_inventory->getInboxPanel())
- {
- sidepanel_inventory->getInboxPanel()->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
- }
- }
- else
- {
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
- if (active_panel)
- {
- active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
- }
- }
-
- }
+ LLInventoryObject *obj = getInventoryObject();
+ if (obj && obj->getIsLinkType())
+ {
+ show_item_original(obj->getUUID());
+ }
}
LLUIImagePtr LLItemBridge::getIcon() const
@@ -4101,6 +4084,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
items.push_back(std::string("New Body Parts"));
items.push_back(std::string("New Settings"));
items.push_back(std::string("upload_def"));
+
+ if (!LLEnvironment::instance().isInventoryEnabled())
+ {
+ disabled_items.push_back("New Settings");
+ }
+
}
}
getClipboardEntries(false, items, disabled_items, flags);
@@ -7037,8 +7026,8 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
if (!item)
return;
LLUUID asset_id = item->getAssetUUID();
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
}
else if ("apply_settings_parcel" == action)
{
@@ -7212,21 +7201,17 @@ void LLLinkFolderBridge::performAction(LLInventoryModel* model, std::string acti
}
void LLLinkFolderBridge::gotoItem()
{
- const LLUUID &cat_uuid = getFolderID();
- if (!cat_uuid.isNull())
- {
- LLFolderViewItem *base_folder = mInventoryPanel.get()->getItemByID(cat_uuid);
- if (base_folder)
- {
- if (LLInventoryModel* model = getInventoryModel())
- {
- model->fetchDescendentsOf(cat_uuid);
- }
- base_folder->setOpen(TRUE);
- mRoot->setSelection(base_folder,TRUE);
- mRoot->scrollToShowSelection();
- }
- }
+ LLItemBridge::gotoItem();
+
+ const LLUUID &cat_uuid = getFolderID();
+ if (!cat_uuid.isNull())
+ {
+ LLFolderViewItem *base_folder = LLInventoryPanel::getActiveInventoryPanel()->getItemByID(cat_uuid);
+ if (base_folder)
+ {
+ base_folder->setOpen(TRUE);
+ }
+ }
}
const LLUUID &LLLinkFolderBridge::getFolderID() const
{
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 2a22eb1329..411311bbea 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -63,7 +63,8 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p)
mPermissions(p.permissions),
mFilterTypes(p.types),
mFilterUUID(p.uuid),
- mFilterLinks(p.links)
+ mFilterLinks(p.links),
+ mSearchVisibility(p.search_visibility)
{
}
@@ -155,6 +156,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
passed = passed && checkAgainstPermissions(listener);
passed = passed && checkAgainstFilterLinks(listener);
passed = passed && checkAgainstCreator(listener);
+ passed = passed && checkAgainstSearchVisibility(listener);
return passed;
}
@@ -583,6 +585,27 @@ bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory
}
}
+bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const
+{
+ if (!listener || !hasFilterString()) return TRUE;
+
+ const LLUUID object_id = listener->getUUID();
+ const LLInventoryObject *object = gInventory.getObject(object_id);
+ if (!object) return TRUE;
+
+ const BOOL is_link = object->getIsLinkType();
+ if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0))
+ return FALSE;
+
+ if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0))
+ return FALSE;
+
+ if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0))
+ return FALSE;
+
+ return TRUE;
+}
+
const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
{
return mFilterSubString;
@@ -751,6 +774,61 @@ void LLInventoryFilter::setFilterMarketplaceListingFolders(bool select_only_list
}
}
+
+void LLInventoryFilter::toggleSearchVisibilityLinks()
+{
+ bool hide_links = mFilterOps.mSearchVisibility & VISIBILITY_LINKS;
+ if (hide_links)
+ {
+ mFilterOps.mSearchVisibility &= ~VISIBILITY_LINKS;
+ }
+ else
+ {
+ mFilterOps.mSearchVisibility |= VISIBILITY_LINKS;
+ }
+
+ if (hasFilterString())
+ {
+ setModified(hide_links ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE);
+ }
+}
+
+void LLInventoryFilter::toggleSearchVisibilityTrash()
+{
+ bool hide_trash = mFilterOps.mSearchVisibility & VISIBILITY_TRASH;
+ if (hide_trash)
+ {
+ mFilterOps.mSearchVisibility &= ~VISIBILITY_TRASH;
+ }
+ else
+ {
+ mFilterOps.mSearchVisibility |= VISIBILITY_TRASH;
+ }
+
+ if (hasFilterString())
+ {
+ setModified(hide_trash ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE);
+ }
+}
+
+void LLInventoryFilter::toggleSearchVisibilityLibrary()
+{
+ bool hide_library = mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY;
+ if (hide_library)
+ {
+ mFilterOps.mSearchVisibility &= ~VISIBILITY_LIBRARY;
+ }
+ else
+ {
+ mFilterOps.mSearchVisibility |= VISIBILITY_LIBRARY;
+ }
+
+ if (hasFilterString())
+ {
+ setModified(hide_library ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE);
+ }
+}
+
void LLInventoryFilter::setFilterNoMarketplaceFolder()
{
mFilterOps.mFilterTypes |= FILTERTYPE_NO_MARKETPLACE_ITEMS;
@@ -862,6 +940,44 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
}
}
+void LLInventoryFilter::setSearchVisibilityTypes(U32 types)
+{
+ if (mFilterOps.mSearchVisibility != types)
+ {
+ // keep current items only if no perm bits getting turned off
+ BOOL fewer_bits_set = (mFilterOps.mSearchVisibility & ~types);
+ BOOL more_bits_set = (~mFilterOps.mSearchVisibility & types);
+ mFilterOps.mSearchVisibility = types;
+
+ if (more_bits_set && fewer_bits_set)
+ {
+ setModified(FILTER_RESTART);
+ }
+ else if (more_bits_set)
+ {
+ // target must have all requested permission bits, so more bits == more restrictive
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+ else if (fewer_bits_set)
+ {
+ setModified(FILTER_LESS_RESTRICTIVE);
+ }
+ }
+}
+
+void LLInventoryFilter::setSearchVisibilityTypes(const Params& params)
+{
+ if (!params.validateBlock())
+ {
+ return;
+ }
+
+ if (params.filter_ops.search_visibility.isProvided())
+ {
+ setSearchVisibilityTypes(params.filter_ops.search_visibility);
+ }
+}
+
void LLInventoryFilter::setFilterPermissions(PermissionMask perms)
{
if (mFilterOps.mPermissions != perms)
@@ -1263,6 +1379,18 @@ const std::string& LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
+ if (isFilterObjectTypesWith(LLInventoryType::IT_SETTINGS))
+ {
+ filtered_types += LLTrans::getString("Settings");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ not_filtered_types += LLTrans::getString("Settings");
+ filtered_by_all_types = FALSE;
+ }
+
if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive()
&& filtered_by_type
&& !filtered_by_all_types)
@@ -1318,6 +1446,7 @@ void LLInventoryFilter::toParams(Params& params) const
params.filter_ops.show_folder_state = getShowFolderState();
params.filter_ops.creator_type = getFilterCreatorType();
params.filter_ops.permissions = getFilterPermissions();
+ params.filter_ops.search_visibility = getSearchVisibilityTypes();
params.substring = getFilterSubString();
params.since_logoff = isSinceLogoff();
}
@@ -1341,6 +1470,7 @@ void LLInventoryFilter::fromParams(const Params& params)
setShowFolderState(params.filter_ops.show_folder_state);
setFilterCreator(params.filter_ops.creator_type);
setFilterPermissions(params.filter_ops.permissions);
+ setSearchVisibilityTypes(params.filter_ops.search_visibility);
setFilterSubString(params.substring);
setDateRangeLastLogoff(params.since_logoff);
}
@@ -1370,6 +1500,11 @@ U64 LLInventoryFilter::getFilterSettingsTypes() const
return mFilterOps.mFilterSettingsTypes;
}
+U64 LLInventoryFilter::getSearchVisibilityTypes() const
+{
+ return mFilterOps.mSearchVisibility;
+}
+
bool LLInventoryFilter::hasFilterString() const
{
return mFilterSubString.size() > 0;
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 61cc5ae602..384de3e889 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -99,6 +99,14 @@ public:
FILTERCREATOR_OTHERS
};
+ enum ESearchVisibility
+ {
+ VISIBILITY_NONE = 0,
+ VISIBILITY_TRASH = 0x1 << 0,
+ VISIBILITY_LIBRARY = 0x1 << 1,
+ VISIBILITY_LINKS = 0x1 << 2
+ };
+
struct FilterOps
{
struct DateRange : public LLInitParam::Block<DateRange>
@@ -116,11 +124,13 @@ public:
struct Params : public LLInitParam::Block<Params>
{
- Optional<U32> types;
+ Optional<U32> types,
+ search_visibility;
Optional<U64> object_types,
wearable_types,
settings_types,
category_types;
+
Optional<EFilterLink> links;
Optional<LLUUID> uuid;
Optional<DateRange> date_range;
@@ -137,6 +147,7 @@ public:
settings_types("settings_types", 0xffffFFFFffffFFFFULL),
category_types("category_types", 0xffffFFFFffffFFFFULL),
links("links", FILTERLINK_INCLUDE_LINKS),
+ search_visibility("search_visibility", 0xFFFFFFFF),
uuid("uuid"),
date_range("date_range"),
hours_ago("hours_ago", 0),
@@ -149,7 +160,8 @@ public:
FilterOps(const Params& = Params());
- U32 mFilterTypes;
+ U32 mFilterTypes,
+ mSearchVisibility;
U64 mFilterObjectTypes, // For _OBJECT
mFilterWearableTypes,
mFilterSettingsTypes, // for _SETTINGS
@@ -193,7 +205,8 @@ public:
U64 getFilterObjectTypes() const;
U64 getFilterCategoryTypes() const;
U64 getFilterWearableTypes() const;
- U64 getFilterSettingsTypes() const;
+ U64 getFilterSettingsTypes() const;
+ U64 getSearchVisibilityTypes() const;
bool isFilterObjectTypesWith(LLInventoryType::EType t) const;
void setFilterObjectTypes(U64 types);
@@ -213,6 +226,12 @@ public:
ESearchType getSearchType() { return mSearchType; }
void setFilterCreator(EFilterCreatorType type);
+ void toggleSearchVisibilityLinks();
+ void toggleSearchVisibilityTrash();
+ void toggleSearchVisibilityLibrary();
+ void setSearchVisibilityTypes(U32 types);
+ void setSearchVisibilityTypes(const Params& params);
+
void setFilterSubString(const std::string& string);
const std::string& getFilterSubString(BOOL trim = FALSE) const;
const std::string& getFilterSubStringOrig() const { return mFilterSubStringOrig; }
@@ -310,6 +329,7 @@ private:
bool checkAgainstPermissions(const LLInventoryItem* item) const;
bool checkAgainstFilterLinks(const class LLFolderViewModelItemInventory* listener) const;
bool checkAgainstCreator(const class LLFolderViewModelItemInventory* listener) const;
+ bool checkAgainstSearchVisibility(const class LLFolderViewModelItemInventory* listener) const;
bool checkAgainstClipboard(const LLUUID& object_id) const;
FilterOps mFilterOps;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 7a0ea8b668..f2e06d19f3 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -774,40 +774,45 @@ void show_item_profile(const LLUUID& item_uuid)
void show_item_original(const LLUUID& item_uuid)
{
- LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
- if (!floater_inventory)
- {
- LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL;
- return;
- }
-
- //sidetray inventory panel
- LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
-
- bool do_reset_inventory_filter = !floater_inventory->isInVisibleChain();
+ LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
+ if (!floater_inventory)
+ {
+ LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL;
+ return;
+ }
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
+ {
+ LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
+ if (main_inventory)
+ {
+ main_inventory->resetFilters();
+ }
+ reset_inventory_filter();
- LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel();
- if (!active_panel)
- {
- //this may happen when there is no floatera and other panel is active in inventory tab
+ if (!LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("inventory")->isInVisibleChain())
+ {
+ LLFloaterReg::toggleInstanceOrBringToFront("inventory");
+ }
- if (sidepanel_inventory)
- {
- sidepanel_inventory->showInventoryPanel();
- }
- }
-
- active_panel = LLInventoryPanel::getActiveInventoryPanel();
- if (!active_panel)
- {
- return;
- }
- active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_YES);
-
- if(do_reset_inventory_filter)
- {
- reset_inventory_filter();
- }
+ const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
+ if (gInventory.isObjectDescendentOf(gInventory.getLinkedItemID(item_uuid), inbox_id))
+ {
+ if (sidepanel_inventory->getInboxPanel())
+ {
+ sidepanel_inventory->openInbox();
+ sidepanel_inventory->getInboxPanel()->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_YES);
+ }
+ }
+ else
+ {
+ sidepanel_inventory->selectAllItemsPanel();
+ if (sidepanel_inventory->getActivePanel())
+ {
+ sidepanel_inventory->getActivePanel()->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_YES);
+ }
+ }
+ }
}
@@ -1842,6 +1847,26 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
return result && !has_bad_items;
}
+void change_item_parent(const LLUUID& item_id, const LLUUID& new_parent_id)
+{
+ LLInventoryItem* inv_item = gInventory.getItem(item_id);
+ if (inv_item)
+ {
+ LLInventoryModel::update_list_t update;
+ LLInventoryModel::LLCategoryUpdate old_folder(inv_item->getParentUUID(), -1);
+ update.push_back(old_folder);
+ LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
+ update.push_back(new_folder);
+ gInventory.accountForUpdate(update);
+
+ LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item);
+ new_item->setParent(new_parent_id);
+ new_item->updateParentOnServer(FALSE);
+ gInventory.updateItem(new_item);
+ gInventory.notifyObservers();
+ }
+}
+
///----------------------------------------------------------------------------
/// LLInventoryCollectFunctor implementations
///----------------------------------------------------------------------------
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 04eb962372..37c3c47336 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -92,6 +92,8 @@ S32 depth_nesting_in_marketplace(LLUUID cur_uuid);
LLUUID nested_parent_id(LLUUID cur_uuid, S32 depth);
S32 compute_stock_count(LLUUID cat_uuid, bool force_count = false);
+void change_item_parent(const LLUUID& item_id, const LLUUID& new_parent_id);
+
/** Miscellaneous global functions
** **
*******************************************************************************/
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 74d9e895c2..3608f9e23f 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -158,7 +158,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mViewsInitialized(VIEWS_UNINITIALIZED),
mInvFVBridgeBuilder(NULL),
mInventoryViewModel(p.name),
- mGroupedItemBridge(new LLFolderViewGroupedItemBridge)
+ mGroupedItemBridge(new LLFolderViewGroupedItemBridge),
+ mFocusSelection(false)
{
mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
@@ -1240,6 +1241,7 @@ void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::
void LLInventoryPanel::clearSelection()
{
mSelectThisID.setNull();
+ mFocusSelection = false;
}
LLInventoryPanel::selected_items_t LLInventoryPanel::getSelectedItems() const
@@ -1714,15 +1716,17 @@ LLFolderViewFolder* LLInventoryPanel::getFolderByID(const LLUUID& id)
void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyboard_focus )
{
LLFolderViewItem* itemp = getItemByID(obj_id);
- if(itemp && itemp->getViewModelItem())
+ if(itemp && itemp->getViewModelItem() && itemp->passedFilter())
{
itemp->arrangeAndSet(TRUE, take_keyboard_focus);
mSelectThisID.setNull();
+ mFocusSelection = false;
return;
}
else
{
// save the desired item to be selected later (if/when ready)
+ mFocusSelection = take_keyboard_focus;
mSelectThisID = obj_id;
}
}
@@ -1731,7 +1735,7 @@ void LLInventoryPanel::updateSelection()
{
if (mSelectThisID.notNull())
{
- setSelectionByID(mSelectThisID, false);
+ setSelectionByID(mSelectThisID, mFocusSelection);
}
}
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index ad6010f09c..a019fc2231 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -269,6 +269,7 @@ protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
LLInvPanelComplObserver* mCompletionObserver;
+ bool mFocusSelection;
bool mAcceptsDragAndDrop;
bool mAllowMultiSelect;
bool mAllowDrag;
@@ -366,27 +367,6 @@ private:
EViewsInitializationState mViewsInitialized; // Whether views have been generated
};
-
-class LLInventoryFavoriteItemsPanel : public LLInventoryPanel
-{
-public:
- struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params>
- {};
-
- void initFromParams(const Params& p);
- bool isSelectionRemovable() { return false; }
- void setSelectCallback(const boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb);
-
-protected:
- LLInventoryFavoriteItemsPanel(const Params& params);
- ~LLInventoryFavoriteItemsPanel() { mFolderChangedSignal.disconnect(); }
- void updateFavoritesRootFolder();
-
- boost::signals2::connection mFolderChangedSignal;
- boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)> mSelectionCallback;
- friend class LLUICtrlFactory;
-};
-
/************************************************************************/
/* Asset Pre-Filtered Inventory Panel related class */
/* Exchanges filter's flexibility for speed of generation and */
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index c243f8b4f0..a17dc674ac 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -228,23 +228,6 @@ LLViewerInventoryItem* LLLandmarkActions::findLandmarkForAgentPos()
return findLandmarkForGlobalPos(gAgent.getPositionGlobal());
}
-bool LLLandmarkActions::canCreateLandmarkHere()
-{
- LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if(!agent_parcel)
- {
- LL_WARNS() << "No agent region" << LL_ENDL;
- return false;
- }
- if (agent_parcel->getAllowLandmark()
- || LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK))
- {
- return true;
- }
-
- return false;
-}
-
void LLLandmarkActions::createLandmarkHere(
const std::string& name,
const std::string& desc,
@@ -261,11 +244,6 @@ void LLLandmarkActions::createLandmarkHere(
LL_WARNS() << "No agent parcel" << LL_ENDL;
return;
}
- if (!canCreateLandmarkHere())
- {
- LLNotificationsUtil::add("CannotCreateLandmarkNotOwner");
- return;
- }
create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
folder_id, LLTransactionID::tnull,
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index 870d92811e..ae7b072fcb 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -72,12 +72,6 @@ public:
*/
static LLViewerInventoryItem* findLandmarkForAgentPos();
-
- /**
- * @brief Checks whether agent has rights to create landmark for current parcel.
- */
- static bool canCreateLandmarkHere();
-
/**
* @brief Creates landmark for current parcel.
*/
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 83195e9e3f..d6f3068610 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -44,6 +44,7 @@
// newview includes
#include "llagent.h"
+#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "llinventoryobserver.h"
#include "lllandmarkactions.h"
@@ -653,7 +654,7 @@ void LLLocationInputCtrl::onAddLandmarkButtonClicked()
}
else
{
- LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
+ LLFloaterReg::showInstance("add_landmark");
}
}
@@ -1126,7 +1127,7 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
if(!landmark)
{
- LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
+ LLFloaterReg::showInstance("add_landmark");
}
else
{
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 663a6071f7..4a8ef53a8b 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -726,7 +726,20 @@ void LLMuteList::requestFromServer(const LLUUID& agent_id)
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MuteData);
msg->addU32Fast(_PREHASH_MuteCRC, crc.getCRC());
- gAgent.sendReliableMessage();
+
+ if (gDisconnected)
+ {
+ LL_WARNS() << "Trying to request mute list when disconnected!" << LL_ENDL;
+ return;
+ }
+ if (!gAgent.getRegion())
+ {
+ LL_WARNS() << "No region for agent yet, skipping mute list request!" << LL_ENDL;
+ return;
+ }
+ // Double amount of retries due to this request happening during busy stage
+ // Ideally this should be turned into a capability
+ gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 179c64b5c5..19dbbeb60e 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -58,6 +58,7 @@
#include "llweb.h"
#include "llhints.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventorymodel.h"
#include "lllandmarkactions.h"
@@ -290,6 +291,7 @@ BOOL LLNavigationBar::postBuild()
mBtnBack = getChild<LLPullButton>("back_btn");
mBtnForward = getChild<LLPullButton>("forward_btn");
mBtnHome = getChild<LLButton>("home_btn");
+ mBtnLandmarks = getChild<LLButton>("landmarks_btn");
mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
@@ -305,6 +307,8 @@ BOOL LLNavigationBar::postBuild()
mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this));
+ mBtnLandmarks->setClickedCallback(boost::bind(&LLNavigationBar::onLandmarksButtonClicked, this));
+
mCmbLocation->setCommitCallback(boost::bind(&LLNavigationBar::onLocationSelection, this));
mTeleportFinishConnection = LLViewerParcelMgr::getInstance()->
@@ -401,6 +405,12 @@ void LLNavigationBar::onHomeButtonClicked()
gAgent.teleportHome();
}
+void LLNavigationBar::onLandmarksButtonClicked()
+{
+ LLFloaterReg::toggleInstanceOrBringToFront("places");
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "open_landmark_tab"));
+}
+
void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata)
{
int idx = userdata.asInteger();
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index a44c6dd699..646911a62c 100755
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -119,6 +119,7 @@ private:
void onNavigationButtonHeldUp(LLButton* nav_button);
void onForwardButtonClicked();
void onHomeButtonClicked();
+ void onLandmarksButtonClicked();
void onLocationSelection();
void onLocationPrearrange(const LLSD& data);
void onTeleportFinished(const LLVector3d& global_agent_pos);
@@ -144,6 +145,7 @@ private:
LLPullButton* mBtnBack;
LLPullButton* mBtnForward;
LLButton* mBtnHome;
+ LLButton* mBtnLandmarks;
LLLocationInputCtrl* mCmbLocation;
LLRect mDefaultNbRect;
LLRect mDefaultFpRect;
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 2e26b69144..a169712bd8 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -69,11 +69,15 @@ namespace
const std::string FIELD_SKY_GLOW_SIZE("glow_size");
const std::string FIELD_SKY_STAR_BRIGHTNESS("star_brightness");
const std::string FIELD_SKY_SUN_ROTATION("sun_rotation");
+ const std::string FIELD_SKY_SUN_AZIMUTH("sun_azimuth");
+ const std::string FIELD_SKY_SUN_ELEVATION("sun_elevation");
const std::string FIELD_SKY_SUN_IMAGE("sun_image");
const std::string FIELD_SKY_SUN_SCALE("sun_scale");
const std::string FIELD_SKY_SUN_BEACON("sunbeacon");
const std::string FIELD_SKY_MOON_BEACON("moonbeacon");
const std::string FIELD_SKY_MOON_ROTATION("moon_rotation");
+ const std::string FIELD_SKY_MOON_AZIMUTH("moon_azimuth");
+ const std::string FIELD_SKY_MOON_ELEVATION("moon_elevation");
const std::string FIELD_SKY_MOON_IMAGE("moon_image");
const std::string FIELD_SKY_MOON_SCALE("moon_scale");
const std::string FIELD_SKY_MOON_BRIGHTNESS("moon_brightness");
@@ -473,12 +477,16 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild()
getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); });
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onStarBrightnessChanged(); });
getChild<LLUICtrl>(FIELD_SKY_SUN_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunRotationChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunAzimElevChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunAzimElevChanged(); });
getChild<LLUICtrl>(FIELD_SKY_SUN_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunImageChanged(); });
getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunScaleChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId());
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetBlankSunTextureId());
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(TRUE);
getChild<LLUICtrl>(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); });
getChild<LLUICtrl>(FIELD_SKY_MOON_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonImageChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetDefaultMoonTextureId());
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetDefaultMoonTextureId());
@@ -537,13 +545,29 @@ void LLPanelSettingsSkySunMoonTab::refresh()
getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setValue(glow.mV[2] / SLIDER_SCALE_GLOW_B);
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setValue(mSkySettings->getStarBrightness());
- getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(mSkySettings->getSunRotation());
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setValue(mSkySettings->getSunTextureId());
getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setValue(mSkySettings->getSunScale());
- getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->setRotation(mSkySettings->getMoonRotation());
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setValue(mSkySettings->getMoonTextureId());
getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setValue(mSkySettings->getMoonScale());
getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setValue(mSkySettings->getMoonBrightness());
+
+ // Sun rotation values
+ F32 azimuth, elevation;
+ LLQuaternion quat = mSkySettings->getSunRotation();
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+
+ getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(quat);
+ getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->setValue(elevation);
+
+ // Moon rotation values
+ quat = mSkySettings->getMoonRotation();
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+
+ getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->setRotation(quat);
+ getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->setValue(elevation);
+
}
//-------------------------------------------------------------------------
@@ -583,10 +607,47 @@ void LLPanelSettingsSkySunMoonTab::onStarBrightnessChanged()
void LLPanelSettingsSkySunMoonTab::onSunRotationChanged()
{
- if (!mSkySettings) return;
- mSkySettings->setSunRotation(getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->getRotation());
- mSkySettings->update();
- setIsDirty();
+ LLQuaternion quat = getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->getRotation();
+
+ F32 azimuth, elevation;
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+ getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->setValue(elevation);
+ if (mSkySettings)
+ {
+ mSkySettings->setSunRotation(quat);
+ mSkySettings->update();
+ setIsDirty();
+ }
+}
+
+void LLPanelSettingsSkySunMoonTab::onSunAzimElevChanged()
+{
+ F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
+ F32 elevation = getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
+ LLQuaternion quat;
+
+ azimuth *= DEG_TO_RAD;
+ elevation *= DEG_TO_RAD;
+
+ if (is_approx_zero(elevation))
+ {
+ elevation = F_APPROXIMATELY_ZERO;
+ }
+
+ quat.setAngleAxis(-elevation, 0, 1, 0);
+ LLQuaternion az_quat;
+ az_quat.setAngleAxis(F_TWO_PI - azimuth, 0, 0, 1);
+ quat *= az_quat;
+
+ getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(quat);
+
+ if (mSkySettings)
+ {
+ mSkySettings->setSunRotation(quat);
+ mSkySettings->update();
+ setIsDirty();
+ }
}
void LLPanelSettingsSkySunMoonTab::onSunScaleChanged()
@@ -607,10 +668,48 @@ void LLPanelSettingsSkySunMoonTab::onSunImageChanged()
void LLPanelSettingsSkySunMoonTab::onMoonRotationChanged()
{
- if (!mSkySettings) return;
- mSkySettings->setMoonRotation(getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->getRotation());
- mSkySettings->update();
- setIsDirty();
+ LLQuaternion quat = getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->getRotation();
+
+ F32 azimuth, elevation;
+ LLVirtualTrackball::getAzimuthAndElevationDeg(quat, azimuth, elevation);
+ getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->setValue(azimuth);
+ getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->setValue(elevation);
+
+ if (mSkySettings)
+ {
+ mSkySettings->setMoonRotation(quat);
+ mSkySettings->update();
+ setIsDirty();
+ }
+}
+
+void LLPanelSettingsSkySunMoonTab::onMoonAzimElevChanged()
+{
+ F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
+ F32 elevation = getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
+ LLQuaternion quat;
+
+ azimuth *= DEG_TO_RAD;
+ elevation *= DEG_TO_RAD;
+
+ if (is_approx_zero(elevation))
+ {
+ elevation = F_APPROXIMATELY_ZERO;
+ }
+
+ quat.setAngleAxis(-elevation, 0, 1, 0);
+ LLQuaternion az_quat;
+ az_quat.setAngleAxis(F_TWO_PI- azimuth, 0, 0, 1);
+ quat *= az_quat;
+
+ getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->setRotation(quat);
+
+ if (mSkySettings)
+ {
+ mSkySettings->setMoonRotation(quat);
+ mSkySettings->update();
+ setIsDirty();
+ }
}
void LLPanelSettingsSkySunMoonTab::onMoonImageChanged()
diff --git a/indra/newview/llpaneleditsky.h b/indra/newview/llpaneleditsky.h
index 801fb8b9b2..cb63d40b0c 100644
--- a/indra/newview/llpaneleditsky.h
+++ b/indra/newview/llpaneleditsky.h
@@ -124,9 +124,11 @@ private:
void onGlowChanged();
void onStarBrightnessChanged();
void onSunRotationChanged();
+ void onSunAzimElevChanged();
void onSunScaleChanged();
void onSunImageChanged();
void onMoonRotationChanged();
+ void onMoonAzimElevChanged();
void onMoonScaleChanged();
void onMoonBrightnessChanged();
void onMoonImageChanged();
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 6751c25fb9..880323ce16 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -52,7 +52,6 @@
typedef std::pair<LLUUID, std::string> folder_pair_t;
static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right);
-static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats);
static LLPanelInjector<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info");
@@ -107,6 +106,18 @@ void LLPanelLandmarkInfo::resetLocation()
// virtual
void LLPanelLandmarkInfo::setInfoType(EInfoType type)
{
+ LLUUID dest_folder;
+ setInfoType(type, dest_folder);
+}
+
+// Sets CREATE_LANDMARK infotype and creates landmark at desired folder
+void LLPanelLandmarkInfo::setInfoAndCreateLandmark(const LLUUID& fodler_id)
+{
+ setInfoType(CREATE_LANDMARK, fodler_id);
+}
+
+void LLPanelLandmarkInfo::setInfoType(EInfoType type, const LLUUID &folder_id)
+{
LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel");
bool is_info_type_create_landmark = type == CREATE_LANDMARK;
@@ -183,7 +194,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
// remote parcel request to complete.
if (!LLLandmarkActions::landmarkAlreadyExists())
{
- createLandmark(LLUUID());
+ createLandmark(folder_id);
}
}
break;
@@ -504,7 +515,7 @@ static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right)
return left.second < right.second;
}
-static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats)
+void LLPanelLandmarkInfo::collectLandmarkFolders(LLInventoryModel::cat_array_t& cats)
{
LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
@@ -517,16 +528,20 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats)
items,
LLInventoryModel::EXCLUDE_TRASH,
is_category);
+}
- // Add the "My Favorites" category.
- LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
- LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id);
- if (!favorites_cat)
- {
- LL_WARNS() << "Cannot find the favorites folder" << LL_ENDL;
- }
- else
- {
- cats.push_back(favorites_cat);
- }
+/* virtual */ void LLUpdateLandmarkParent::fire(const LLUUID& inv_item_id)
+{
+ LLInventoryModel::update_list_t update;
+ LLInventoryModel::LLCategoryUpdate old_folder(mItem->getParentUUID(), -1);
+ update.push_back(old_folder);
+ LLInventoryModel::LLCategoryUpdate new_folder(mNewParentId, 1);
+ update.push_back(new_folder);
+ gInventory.accountForUpdate(update);
+
+ mItem->setParent(mNewParentId);
+ mItem->updateParentOnServer(FALSE);
+
+ gInventory.updateItem(mItem);
+ gInventory.notifyObservers();
}
diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h
index 9712736182..f727f286b5 100644
--- a/indra/newview/llpanellandmarkinfo.h
+++ b/indra/newview/llpanellandmarkinfo.h
@@ -28,6 +28,7 @@
#define LL_LLPANELLANDMARKINFO_H
#include "llpanelplaceinfo.h"
+#include "llinventorymodel.h"
class LLComboBox;
class LLLineEditor;
@@ -43,8 +44,12 @@ public:
/*virtual*/ void resetLocation();
+ // If landmark doesn't exists, will create it at default folder
/*virtual*/ void setInfoType(EInfoType type);
+ // Sets CREATE_LANDMARK infotype and creates landmark at desired folder
+ void setInfoAndCreateLandmark(const LLUUID& fodler_id);
+
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
// Displays landmark owner, creator and creation date info.
@@ -59,13 +64,19 @@ public:
// Select current landmark folder in combobox.
BOOL setLandmarkFolder(const LLUUID& id);
- // Create a landmark for the current location
- // in a folder specified by folder_id.
- void createLandmark(const LLUUID& folder_id);
-
+ typedef std::vector<LLPointer<LLViewerInventoryCategory> > cat_array_t;
static std::string getFullFolderName(const LLViewerInventoryCategory* cat);
+ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats);
private:
+ // Create a landmark for the current location
+ // in a folder specified by folder_id.
+ // Expects title and description to be initialized
+ void createLandmark(const LLUUID& folder_id);
+
+ // If landmark doesn't exists, will create it at specified folder
+ void setInfoType(EInfoType type, const LLUUID &folder_id);
+
void populateFoldersList();
LLTextBox* mOwner;
@@ -77,4 +88,17 @@ private:
LLComboBox* mFolderCombo;
};
+class LLUpdateLandmarkParent : public LLInventoryCallback
+{
+public:
+ LLUpdateLandmarkParent(LLPointer<LLViewerInventoryItem> item, LLUUID new_parent) :
+ mItem(item),
+ mNewParentId(new_parent)
+ {};
+ /* virtual */ void fire(const LLUUID& inv_item_id);
+
+private:
+ LLPointer<LLViewerInventoryItem> mItem;
+ LLUUID mNewParentId;
+};
#endif // LL_LLPANELLANDMARKINFO_H
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index ccd8497484..e698a61fef 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -36,12 +36,11 @@
#include "llregionhandle.h"
#include "llaccordionctrl.h"
-#include "llaccordionctrltab.h"
#include "llagent.h"
#include "llagentpicksinfo.h"
#include "llagentui.h"
+#include "llavataractions.h"
#include "llcallbacklist.h"
-#include "lldndbutton.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llfolderviewitem.h"
@@ -60,15 +59,8 @@
// Not yet implemented; need to remove buildPanel() from constructor when we switch
//static LLRegisterPanelClassWrapper<LLLandmarksPanel> t_landmarks("panel_landmarks");
-static const std::string OPTIONS_BUTTON_NAME = "options_gear_btn";
-static const std::string ADD_BUTTON_NAME = "add_btn";
-static const std::string ADD_FOLDER_BUTTON_NAME = "add_folder_btn";
-static const std::string TRASH_BUTTON_NAME = "trash_btn";
-
-
// helper functions
static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::string& string);
-static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list);
static void collapse_all_folders(LLFolderView* root_folder);
static void expand_all_folders(LLFolderView* root_folder);
static bool has_expanded_folders(LLFolderView* root_folder);
@@ -149,69 +141,37 @@ void LLOpenFolderByID::doFolder(LLFolderViewFolder* folder)
}
}
-/**
- * Bridge to support knowing when the inventory has changed to update Landmarks tab
- * ShowFolderState filter setting to show all folders when the filter string is empty and
- * empty folder message when Landmarks inventory category has no children.
- * Ensures that "Landmarks" folder in the Library is open on strart up.
- */
-class LLLandmarksPanelObserver : public LLInventoryObserver
-{
-public:
- LLLandmarksPanelObserver(LLLandmarksPanel* lp)
- : mLP(lp),
- mIsLibraryLandmarksOpen(false)
- {}
- virtual ~LLLandmarksPanelObserver() {}
- /*virtual*/ void changed(U32 mask);
-
-private:
- LLLandmarksPanel* mLP;
- bool mIsLibraryLandmarksOpen;
-};
-
-void LLLandmarksPanelObserver::changed(U32 mask)
+LLLandmarksPanel::LLLandmarksPanel()
+ : LLPanelPlacesTab()
+ , mLandmarksInventoryPanel(NULL)
+ , mCurrentSelectedList(NULL)
+ , mGearFolderMenu(NULL)
+ , mGearLandmarkMenu(NULL)
+ , mSortingMenu(NULL)
+ , mAddMenu(NULL)
+ , isLandmarksPanel(true)
{
- mLP->updateShowFolderState();
-
- LLPlacesInventoryPanel* library = mLP->getLibraryInventoryPanel();
- if (!mIsLibraryLandmarksOpen && library)
- {
- // Search for "Landmarks" folder in the Library and open it once on start up. See EXT-4827.
- const LLUUID &landmarks_cat = gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
- if (landmarks_cat.notNull())
- {
- LLOpenFolderByID opener(landmarks_cat);
- library->getRootFolder()->applyFunctorRecursively(opener);
- mIsLibraryLandmarksOpen = opener.isFolderOpen();
- }
- }
+ buildFromFile("panel_landmarks.xml");
}
-LLLandmarksPanel::LLLandmarksPanel()
+LLLandmarksPanel::LLLandmarksPanel(bool is_landmark_panel)
: LLPanelPlacesTab()
- , mFavoritesInventoryPanel(NULL)
, mLandmarksInventoryPanel(NULL)
- , mMyInventoryPanel(NULL)
- , mLibraryInventoryPanel(NULL)
, mCurrentSelectedList(NULL)
- , mListCommands(NULL)
- , mGearButton(NULL)
, mGearFolderMenu(NULL)
, mGearLandmarkMenu(NULL)
+ , mSortingMenu(NULL)
+ , mAddMenu(NULL)
+ , isLandmarksPanel(is_landmark_panel)
{
- mInventoryObserver = new LLLandmarksPanelObserver(this);
- gInventory.addObserver(mInventoryObserver);
-
- buildFromFile( "panel_landmarks.xml");
+ if (is_landmark_panel)
+ {
+ buildFromFile("panel_landmarks.xml");
+ }
}
LLLandmarksPanel::~LLLandmarksPanel()
{
- if (gInventory.containsObserver(mInventoryObserver))
- {
- gInventory.removeObserver(mInventoryObserver);
- }
}
BOOL LLLandmarksPanel::postBuild()
@@ -221,17 +181,7 @@ BOOL LLLandmarksPanel::postBuild()
// mast be called before any other initXXX methods to init Gear menu
initListCommandsHandlers();
-
- initFavoritesInventoryPanel();
initLandmarksInventoryPanel();
- initMyInventoryPanel();
- initLibraryInventoryPanel();
-
- LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("landmarks_accordion");
- if (accordion)
- {
- accordion->setSkipScrollToChild(true);
- }
return TRUE;
}
@@ -239,30 +189,10 @@ BOOL LLLandmarksPanel::postBuild()
// virtual
void LLLandmarksPanel::onSearchEdit(const std::string& string)
{
- // give FolderView a chance to be refreshed. So, made all accordions visible
- for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
- {
- LLAccordionCtrlTab* tab = *iter;
- tab->setVisible(TRUE);
-
- // expand accordion to see matched items in each one. See EXT-2014.
- if (string != "")
- {
- tab->changeOpenClose(false);
- }
-
- LLPlacesInventoryPanel* inventory_list = dynamic_cast<LLPlacesInventoryPanel*>(tab->getAccordionView());
- if (NULL == inventory_list) continue;
-
- filter_list(inventory_list, string);
- }
+ filter_list(mCurrentSelectedList, string);
if (sFilterSubString != string)
sFilterSubString = string;
-
- // show all folders in Landmarks Accordion for empty filter
- // only if Landmarks inventory folder is not empty
- updateShowFolderState();
}
// virtual
@@ -274,11 +204,6 @@ void LLLandmarksPanel::onShowOnMap()
return;
}
- // Disable the "Map" button because loading landmark can take some time.
- // During this time the button is useless. It will be enabled on callback finish
- // or upon switching to other item.
- mShowOnMapBtn->setEnabled(FALSE);
-
doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doShowOnMap, this, _1));
}
@@ -303,6 +228,12 @@ void LLLandmarksPanel::onTeleport()
}
}
+/*virtual*/
+void LLLandmarksPanel::onRemoveSelected()
+{
+ onClipboardAction("delete");
+}
+
// virtual
bool LLLandmarksPanel::isSingleItemSelected()
{
@@ -322,86 +253,55 @@ bool LLLandmarksPanel::isSingleItemSelected()
}
// virtual
-void LLLandmarksPanel::updateVerbs()
-{
- if (!isTabVisible())
- return;
-
- bool landmark_selected = isLandmarkSelected();
- mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport"));
- mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info"));
- mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map"));
-
- // TODO: mantipov: Uncomment when mShareBtn is supported
- // Share button should be enabled when neither a folder nor a landmark is selected
- //mShareBtn->setEnabled(NULL != current_item);
-
- updateListCommands();
+LLToggleableMenu* LLLandmarksPanel::getSelectionMenu()
+{
+ LLToggleableMenu* menu = mGearFolderMenu;
+
+ if (mCurrentSelectedList)
+ {
+ LLFolderViewModelItemInventory* listenerp = getCurSelectedViewModelItem();
+ if (!listenerp)
+ return menu;
+
+ if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
+ {
+ menu = mGearLandmarkMenu;
+ }
+ }
+ return menu;
}
-void LLLandmarksPanel::onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+// virtual
+LLToggleableMenu* LLLandmarksPanel::getSortingMenu()
{
- if (user_action && (items.size() > 0))
- {
- deselectOtherThan(inventory_list);
- mCurrentSelectedList = inventory_list;
- }
- updateVerbs();
+ return mSortingMenu;
}
-void LLLandmarksPanel::onSelectorButtonClicked()
+// virtual
+LLToggleableMenu* LLLandmarksPanel::getCreateMenu()
{
- // TODO: mantipov: update getting of selected item
- // TODO: bind to "i" button
- LLFolderViewItem* cur_item = mFavoritesInventoryPanel->getRootFolder()->getCurSelectedItem();
- if (!cur_item) return;
-
- LLFolderViewModelItemInventory* listenerp = static_cast<LLFolderViewModelItemInventory*>(cur_item->getViewModelItem());
- if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
- {
- LLSD key;
- key["type"] = "landmark";
- key["id"] = listenerp->getUUID();
-
- LLFloaterSidePanelContainer::showPanel("places", key);
- }
+ return mAddMenu;
}
-void LLLandmarksPanel::updateShowFolderState()
+void LLLandmarksPanel::updateVerbs()
{
- bool show_all_folders = mLandmarksInventoryPanel->getFilterSubString().empty();
- if (show_all_folders)
+ if (sRemoveBtn)
{
- show_all_folders = category_has_descendents(mLandmarksInventoryPanel);
+ sRemoveBtn->setEnabled(isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected()));
}
-
- mLandmarksInventoryPanel->setShowFolderState(show_all_folders ?
- LLInventoryFilter::SHOW_ALL_FOLDERS :
- LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS
- );
}
void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus)
{
- if (selectItemInAccordionTab(mFavoritesInventoryPanel, "tab_favorites", obj_id, take_keyboard_focus))
- {
+ if (!mCurrentSelectedList)
return;
- }
- if (selectItemInAccordionTab(mLandmarksInventoryPanel, "tab_landmarks", obj_id, take_keyboard_focus))
- {
- return;
- }
-
- if (selectItemInAccordionTab(mMyInventoryPanel, "tab_inventory", obj_id, take_keyboard_focus))
- {
- return;
- }
-
- if (selectItemInAccordionTab(mLibraryInventoryPanel, "tab_library", obj_id, take_keyboard_focus))
- {
+ LLFolderView* root = mCurrentSelectedList->getRootFolder();
+ LLFolderViewItem* item = mCurrentSelectedList->getItemByID(obj_id);
+ if (!item)
return;
- }
+ root->setSelection(item, FALSE, take_keyboard_focus);
+ root->scrollToShowSelection();
}
//////////////////////////////////////////////////////////////////////////
@@ -420,18 +320,6 @@ bool LLLandmarksPanel::isFolderSelected() const
return current_item && (current_item->getInventoryType() == LLInventoryType::IT_CATEGORY);
}
-bool LLLandmarksPanel::isReceivedFolderSelected() const
-{
- // Received Folder can be only in Landmarks accordion
- if (mCurrentSelectedList != mLandmarksInventoryPanel) return false;
-
- // *TODO: it should be filled with logic when EXT-976 is done.
-
- LL_WARNS() << "Not implemented yet until EXT-976 is done." << LL_ENDL;
-
- return false;
-}
-
void LLLandmarksPanel::doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb)
{
LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem();
@@ -461,36 +349,6 @@ LLFolderViewModelItemInventory* LLLandmarksPanel::getCurSelectedViewModelItem()
}
-LLFolderViewItem* LLLandmarksPanel::selectItemInAccordionTab(LLPlacesInventoryPanel* inventory_list,
- const std::string& tab_name,
- const LLUUID& obj_id,
- BOOL take_keyboard_focus) const
-{
- if (!inventory_list)
- return NULL;
-
- LLFolderView* root = inventory_list->getRootFolder();
-
- LLFolderViewItem* item = inventory_list->getItemByID(obj_id);
- if (!item)
- return NULL;
-
- LLAccordionCtrlTab* tab = getChild<LLAccordionCtrlTab>(tab_name);
- if (!tab->isExpanded())
- {
- tab->changeOpenClose(false);
- }
-
- root->setSelection(item, FALSE, take_keyboard_focus);
-
- LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("landmarks_accordion");
- LLRect screen_rc;
- localRectToScreen(item->getRect(), &screen_rc);
- accordion->notifyParent(LLSD().with("scrollToShowRect", screen_rc.getValue()));
-
- return item;
-}
-
void LLLandmarksPanel::updateSortOrder(LLInventoryPanel* panel, bool byDate)
{
if(!panel) return;
@@ -506,19 +364,29 @@ void LLLandmarksPanel::updateSortOrder(LLInventoryPanel* panel, bool byDate)
}
}
+void LLLandmarksPanel::resetSelection()
+{
+}
+
// virtual
void LLLandmarksPanel::processParcelInfo(const LLParcelData& parcel_data)
{
//this function will be called after user will try to create a pick for selected landmark.
// We have to make request to sever to get parcel_id and snaption_id.
- if(isLandmarkSelected())
+ if(mCreatePickItemId.notNull())
{
- LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem();
- if (!cur_item) return;
- LLUUID id = cur_item->getUUID();
- LLInventoryItem* inv_item = mCurrentSelectedList->getModel()->getItem(id);
- doActionOnCurSelectedLandmark(boost::bind(
- &LLLandmarksPanel::doProcessParcelInfo, this, _1, getCurSelectedItem(), inv_item, parcel_data));
+ LLInventoryItem* inv_item = gInventory.getItem(mCreatePickItemId);
+
+ if (inv_item && inv_item->getInventoryType() == LLInventoryType::IT_LANDMARK)
+ {
+ // we are processing response for doCreatePick, landmark should be already loaded
+ LLLandmark* landmark = LLLandmarkActions::getLandmark(inv_item->getUUID());
+ if (landmark)
+ {
+ doProcessParcelInfo(landmark, inv_item, parcel_data);
+ }
+ }
+ mCreatePickItemId.setNull();
}
}
@@ -543,16 +411,6 @@ void LLLandmarksPanel::setErrorStatus(S32 status, const std::string& reason)
// PRIVATE METHODS
//////////////////////////////////////////////////////////////////////////
-void LLLandmarksPanel::initFavoritesInventoryPanel()
-{
- mFavoritesInventoryPanel = getChild<LLPlacesInventoryPanel>("favorites_list");
-
- initLandmarksPanel(mFavoritesInventoryPanel);
- mFavoritesInventoryPanel->getFilter().setEmptyLookupMessage("FavoritesNoMatchingItems");
-
- initAccordion("tab_favorites", mFavoritesInventoryPanel, true);
-}
-
void LLLandmarksPanel::initLandmarksInventoryPanel()
{
mLandmarksInventoryPanel = getChild<LLPlacesInventoryPanel>("landmarks_list");
@@ -564,40 +422,14 @@ void LLLandmarksPanel::initLandmarksInventoryPanel()
// subscribe to have auto-rename functionality while creating New Folder
mLandmarksInventoryPanel->setSelectCallback(boost::bind(&LLInventoryPanel::onSelectionChange, mLandmarksInventoryPanel, _1, _2));
- mMyLandmarksAccordionTab = initAccordion("tab_landmarks", mLandmarksInventoryPanel, true);
-}
-
-void LLLandmarksPanel::initMyInventoryPanel()
-{
- mMyInventoryPanel= getChild<LLPlacesInventoryPanel>("my_inventory_list");
-
- initLandmarksPanel(mMyInventoryPanel);
-
- initAccordion("tab_inventory", mMyInventoryPanel, false);
-}
-
-void LLLandmarksPanel::initLibraryInventoryPanel()
-{
- mLibraryInventoryPanel = getChild<LLPlacesInventoryPanel>("library_list");
-
- initLandmarksPanel(mLibraryInventoryPanel);
-
- // We want to fetch only "Landmarks" category from the library.
- const LLUUID &landmarks_cat = gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
- if (landmarks_cat.notNull())
- {
- LLInventoryModelBackgroundFetch::instance().start(landmarks_cat);
- }
-
- // Expanding "Library" tab for new users who have no landmarks in "My Inventory".
- initAccordion("tab_library", mLibraryInventoryPanel, true);
+ mCurrentSelectedList = mLandmarksInventoryPanel;
}
void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list)
{
inventory_list->getFilter().setEmptyLookupMessage("PlacesNoMatchingItems");
inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK);
- inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2));
+ inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::updateVerbs, this));
inventory_list->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate");
@@ -615,86 +447,10 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list
inventory_list->saveFolderState();
}
-LLAccordionCtrlTab* LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list, bool expand_tab)
-{
- LLAccordionCtrlTab* accordion_tab = getChild<LLAccordionCtrlTab>(accordion_tab_name);
-
- mAccordionTabs.push_back(accordion_tab);
- accordion_tab->setDropDownStateChangedCallback(
- boost::bind(&LLLandmarksPanel::onAccordionExpandedCollapsed, this, _2, inventory_list));
- accordion_tab->setDisplayChildren(expand_tab);
- return accordion_tab;
-}
-
-void LLLandmarksPanel::onAccordionExpandedCollapsed(const LLSD& param, LLPlacesInventoryPanel* inventory_list)
-{
- bool expanded = param.asBoolean();
-
- if(!expanded && (mCurrentSelectedList == inventory_list))
- {
- inventory_list->getRootFolder()->clearSelection();
-
- mCurrentSelectedList = NULL;
- updateVerbs();
- }
-
- // Start background fetch, mostly for My Inventory and Library
- if (expanded)
- {
- const LLUUID &cat_id = inventory_list->getRootFolderID();
- // Just because the category itself has been fetched, doesn't mean its child folders have.
- /*
- if (!gInventory.isCategoryComplete(cat_id))
- */
- {
- LLInventoryModelBackgroundFetch::instance().start(cat_id);
- }
-
- // Apply filter substring because it might have been changed
- // while accordion was closed. See EXT-3714.
- filter_list(inventory_list, sFilterSubString);
- }
-}
-
-void LLLandmarksPanel::deselectOtherThan(const LLPlacesInventoryPanel* inventory_list)
-{
- if (inventory_list != mFavoritesInventoryPanel)
- {
- mFavoritesInventoryPanel->clearSelection();
- }
-
- if (inventory_list != mLandmarksInventoryPanel)
- {
- mLandmarksInventoryPanel->clearSelection();
- }
- if (inventory_list != mMyInventoryPanel)
- {
- mMyInventoryPanel->clearSelection();
- }
- if (inventory_list != mLibraryInventoryPanel)
- {
- mLibraryInventoryPanel->clearSelection();
- }
-}
// List Commands Handlers
void LLLandmarksPanel::initListCommandsHandlers()
{
- mListCommands = getChild<LLPanel>("bottom_panel");
-
- mGearButton = getChild<LLMenuButton>(OPTIONS_BUTTON_NAME);
- mGearButton->setMouseDownCallback(boost::bind(&LLLandmarksPanel::onActionsButtonClick, this));
-
- mListCommands->childSetAction(TRASH_BUTTON_NAME, boost::bind(&LLLandmarksPanel::onTrashButtonClick, this));
-
- LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>(TRASH_BUTTON_NAME);
- trash_btn->setDragAndDropHandler(boost::bind(&LLLandmarksPanel::handleDragAndDropToTrash, this
- , _4 // BOOL drop
- , _5 // EDragAndDropType cargo_type
- , _6 // void* cargo_data
- , _7 // EAcceptance* accept
- ));
-
mCommitCallbackRegistrar.add("Places.LandmarksGear.Add.Action", boost::bind(&LLLandmarksPanel::onAddAction, this, _2));
mCommitCallbackRegistrar.add("Places.LandmarksGear.CopyPaste.Action", boost::bind(&LLLandmarksPanel::onClipboardAction, this, _2));
mCommitCallbackRegistrar.add("Places.LandmarksGear.Custom.Action", boost::bind(&LLLandmarksPanel::onCustomAction, this, _2));
@@ -703,23 +459,16 @@ void LLLandmarksPanel::initListCommandsHandlers()
mEnableCallbackRegistrar.add("Places.LandmarksGear.Enable", boost::bind(&LLLandmarksPanel::isActionEnabled, this, _2));
mGearLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_places_gear_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mGearFolderMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_places_gear_folder.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_place_add_button.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mSortingMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_places_gear_sorting.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mAddMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place_add_button.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mGearLandmarkMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
mGearFolderMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
- mListCommands->childSetAction(ADD_BUTTON_NAME, boost::bind(&LLLandmarksPanel::showActionMenu, this, mMenuAdd, ADD_BUTTON_NAME));
-}
-
-
-void LLLandmarksPanel::updateListCommands()
-{
- bool add_folder_enabled = isActionEnabled("category");
- bool trash_enabled = isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected());
-
- // keep Options & Add Landmark buttons always enabled
- mListCommands->getChildView(ADD_FOLDER_BUTTON_NAME)->setEnabled(add_folder_enabled);
- mListCommands->getChildView(TRASH_BUTTON_NAME)->setEnabled(trash_enabled);
+ // show menus even if all items are disabled
+ mGearLandmarkMenu->setAlwaysShowMenu(TRUE);
+ mGearFolderMenu->setAlwaysShowMenu(TRUE);
+ mAddMenu->setAlwaysShowMenu(TRUE);
}
void LLLandmarksPanel::updateMenuVisibility(LLUICtrl* menu)
@@ -727,43 +476,6 @@ void LLLandmarksPanel::updateMenuVisibility(LLUICtrl* menu)
onMenuVisibilityChange(menu, LLSD().with("visibility", true));
}
-void LLLandmarksPanel::onActionsButtonClick()
-{
- LLToggleableMenu* menu = mGearFolderMenu;
-
- if(mCurrentSelectedList)
- {
- LLFolderViewModelItemInventory* listenerp = getCurSelectedViewModelItem();
- if(!listenerp)
- return;
-
- if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
- {
- menu = mGearLandmarkMenu;
- }
- }
-
- mGearButton->setMenu(menu);
-}
-
-void LLLandmarksPanel::showActionMenu(LLMenuGL* menu, std::string spawning_view_name)
-{
- if (menu)
- {
- menu->buildDrawLabels();
- menu->updateParent(LLMenuGL::sMenuContainer);
- menu->arrangeAndClear();
-
- LLView* spawning_view = getChild<LLView>(spawning_view_name);
-
- S32 menu_x, menu_y;
- //show menu in co-ordinates of panel
- spawning_view->localPointToOtherView(0, spawning_view->getRect().getHeight(), &menu_x, &menu_y, this);
- menu_y += menu->getRect().getHeight();
- LLMenuGL::showPopup(this, menu, menu_x, menu_y);
- }
-}
-
void LLLandmarksPanel::onTrashButtonClick() const
{
onClipboardAction("delete");
@@ -775,7 +487,8 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
LLFolderViewItem* item = getCurSelectedItem();
std::string command_name = userdata.asString();
- if("add_landmark" == command_name)
+ if("add_landmark" == command_name
+ || "add_landmark_root" == command_name)
{
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
if(landmark)
@@ -784,7 +497,20 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
}
else
{
- LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
+ LLSD args;
+ args["type"] = "create_landmark";
+ if ("add_landmark" == command_name
+ && view_model->getInventoryType() == LLInventoryType::IT_CATEGORY)
+ {
+ args["dest_folder"] = view_model->getUUID();
+ }
+ if ("add_landmark_root" == command_name
+ && mCurrentSelectedList == mLandmarksInventoryPanel)
+ {
+ args["dest_folder"] = mLandmarksInventoryPanel->getRootFolderID();
+ }
+ // else will end up in favorites
+ LLFloaterReg::showInstance("add_landmark", args);
}
}
else if ("category" == command_name)
@@ -816,13 +542,14 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
//in case My Landmarks tab is completely empty (thus cannot be determined as being selected)
menu_create_inventory_item(mLandmarksInventoryPanel, NULL, LLSD("category"),
gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK));
-
- if (mMyLandmarksAccordionTab)
- {
- mMyLandmarksAccordionTab->changeOpenClose(false);
- }
}
}
+ else if ("category_root" == command_name)
+ {
+ //in case My Landmarks tab is completely empty (thus cannot be determined as being selected)
+ menu_create_inventory_item(mLandmarksInventoryPanel, NULL, LLSD("category"),
+ gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK));
+ }
}
void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const
@@ -856,27 +583,11 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
if ("expand_all" == command_name)
{
- expand_all_folders(mFavoritesInventoryPanel->getRootFolder());
- expand_all_folders(mLandmarksInventoryPanel->getRootFolder());
- expand_all_folders(mMyInventoryPanel->getRootFolder());
- expand_all_folders(mLibraryInventoryPanel->getRootFolder());
-
- for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
- {
- (*iter)->changeOpenClose(false);
- }
+ expand_all_folders(mCurrentSelectedList->getRootFolder());
}
else if ("collapse_all" == command_name)
{
- collapse_all_folders(mFavoritesInventoryPanel->getRootFolder());
- collapse_all_folders(mLandmarksInventoryPanel->getRootFolder());
- collapse_all_folders(mMyInventoryPanel->getRootFolder());
- collapse_all_folders(mLibraryInventoryPanel->getRootFolder());
-
- for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
- {
- (*iter)->changeOpenClose(true);
- }
+ collapse_all_folders(mCurrentSelectedList->getRootFolder());
}
else if ("sort_by_date" == command_name)
{
@@ -884,8 +595,6 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
sorting_order=!sorting_order;
gSavedSettings.setBOOL("LandmarksSortedByDate",sorting_order);
updateSortOrder(mLandmarksInventoryPanel, sorting_order);
- updateSortOrder(mMyInventoryPanel, sorting_order);
- updateSortOrder(mLibraryInventoryPanel, sorting_order);
}
else
{
@@ -917,51 +626,21 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
? mCurrentSelectedList->getRootFolder()
: NULL;
+ bool is_single_selection = root_folder_view && root_folder_view->getSelectedCount() == 1;
+
if ("collapse_all" == command_name)
{
- bool disable_collapse_all = !has_expanded_folders(mFavoritesInventoryPanel->getRootFolder())
- && !has_expanded_folders(mLandmarksInventoryPanel->getRootFolder())
- && !has_expanded_folders(mMyInventoryPanel->getRootFolder())
- && !has_expanded_folders(mLibraryInventoryPanel->getRootFolder());
- if (disable_collapse_all)
- {
- for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
- {
- if ((*iter)->isExpanded())
- {
- disable_collapse_all = false;
- break;
- }
- }
- }
-
- return !disable_collapse_all;
+ return has_expanded_folders(mCurrentSelectedList->getRootFolder());
}
else if ("expand_all" == command_name)
{
- bool disable_expand_all = !has_collapsed_folders(mFavoritesInventoryPanel->getRootFolder())
- && !has_collapsed_folders(mLandmarksInventoryPanel->getRootFolder())
- && !has_collapsed_folders(mMyInventoryPanel->getRootFolder())
- && !has_collapsed_folders(mLibraryInventoryPanel->getRootFolder());
- if (disable_expand_all)
- {
- for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
- {
- if (!(*iter)->isExpanded())
- {
- disable_expand_all = false;
- break;
- }
- }
- }
-
- return !disable_expand_all;
+ return has_collapsed_folders(mCurrentSelectedList->getRootFolder());
}
else if ("sort_by_date" == command_name)
{
- // disable "sort_by_date" for Favorites accordion because
+ // disable "sort_by_date" for Favorites tab because
// it has its own items order. EXT-1758
- if (mCurrentSelectedList == mFavoritesInventoryPanel)
+ if (!isLandmarksPanel)
{
return false;
}
@@ -978,6 +657,11 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
std::set<LLFolderViewItem*> selected_uuids = root_folder_view->getSelectionList();
+ if (selected_uuids.empty())
+ {
+ return false;
+ }
+
// Allow to execute the command only if it can be applied to all selected items.
for (std::set<LLFolderViewItem*>::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter)
{
@@ -998,7 +682,6 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
)
{
// disable some commands for multi-selection. EXT-1757
- bool is_single_selection = root_folder_view && root_folder_view->getSelectedCount() == 1;
if (!is_single_selection)
{
return false;
@@ -1017,9 +700,9 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
// Disable "Show on Map" if landmark loading is in progress.
return !gLandmarkList.isAssetInLoadedCallbackMap(asset_uuid);
- }
- else if ("rename" == command_name)
- {
+ }
+ else if ("rename" == command_name)
+ {
LLFolderViewItem* selected_item = getCurSelectedItem();
if (!selected_item) return false;
@@ -1028,16 +711,10 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
return true;
}
- else if("category" == command_name)
- {
- // we can add folder only in Landmarks Accordion
- if (mCurrentSelectedList == mLandmarksInventoryPanel)
- {
- // ... but except Received folder
- return !isReceivedFolderSelected();
- }
- //"Add a folder" is enabled by default (case when My Landmarks is empty)
- else return true;
+ if ("category_root" == command_name || "category" == command_name)
+ {
+ // we can add folder only in Landmarks tab
+ return isLandmarksPanel;
}
else if("create_pick" == command_name)
{
@@ -1051,6 +728,78 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
}
return false;
}
+ else if ("add_landmark" == command_name)
+ {
+ if (!is_single_selection)
+ {
+ return false;
+ }
+
+ LLFolderViewModelItemInventory* view_model = getCurSelectedViewModelItem();
+ if (!view_model || view_model->getInventoryType() != LLInventoryType::IT_CATEGORY)
+ {
+ return false;
+ }
+ LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
+ if (landmark)
+ {
+ //already exists
+ return false;
+ }
+ return true;
+ }
+ else if ("add_landmark_root" == command_name)
+ {
+ LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
+ if (landmark)
+ {
+ //already exists
+ return false;
+ }
+ return true;
+ }
+ else if ("share" == command_name)
+ {
+ if (!mCurrentSelectedList)
+ {
+ return false;
+ }
+ if (!LLAvatarActions::canShareSelectedItems(mCurrentSelectedList))
+ {
+ return false;
+ }
+ return true;
+ }
+ else if (command_name == "move_to_landmarks" || command_name == "move_to_favorites")
+ {
+ LLFolderViewModelItemInventory* cur_item_model = getCurSelectedViewModelItem();
+ if (cur_item_model)
+ {
+ LLFolderType::EType folder_type = command_name == "move_to_landmarks" ? LLFolderType::FT_FAVORITE : LLFolderType::FT_LANDMARK;
+ if (!gInventory.isObjectDescendentOf(cur_item_model->getUUID(), gInventory.findCategoryUUIDForType(folder_type)))
+ {
+ return false;
+ }
+
+ if (root_folder_view)
+ {
+ std::set<LLFolderViewItem*> selected_uuids = root_folder_view->getSelectionList();
+ for (std::set<LLFolderViewItem*>::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter)
+ {
+ LLFolderViewItem* item = *iter;
+ if (!item) return false;
+
+ cur_item_model = static_cast<LLFolderViewModelItemInventory*>(item->getViewModelItem());
+ if (!cur_item_model || cur_item_model->getInventoryType() != LLInventoryType::IT_LANDMARK)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+ }
else
{
LL_WARNS() << "Unprocessed command has come: " << command_name << LL_ENDL;
@@ -1076,12 +825,42 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata)
}
else if ("create_pick" == command_name)
{
- doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doCreatePick, this, _1));
+ LLFolderViewModelItemInventory* cur_item = getCurSelectedViewModelItem();
+ if (cur_item)
+ {
+ doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doCreatePick, this, _1, cur_item->getUUID()));
+ }
}
+ else if ("share" == command_name && mCurrentSelectedList)
+ {
+ LLAvatarActions::shareWithAvatars(mCurrentSelectedList);
+ }
else if ("restore" == command_name && mCurrentSelectedList)
{
mCurrentSelectedList->doToSelected(userdata);
}
+ else if (command_name == "move_to_landmarks" || command_name == "move_to_favorites")
+ {
+ LLFolderView* root_folder_view = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : NULL;
+ if (root_folder_view)
+ {
+ LLFolderType::EType folder_type = command_name == "move_to_landmarks" ? LLFolderType::FT_LANDMARK : LLFolderType::FT_FAVORITE;
+ std::set<LLFolderViewItem*> selected_uuids = root_folder_view->getSelectionList();
+ for (std::set<LLFolderViewItem*>::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter)
+ {
+ LLFolderViewItem* item = *iter;
+ if (item)
+ {
+ LLFolderViewModelItemInventory* item_model = static_cast<LLFolderViewModelItemInventory*>(item->getViewModelItem());
+ if (item_model)
+ {
+ change_item_parent(item_model->getUUID(), gInventory.findCategoryUUIDForType(folder_type));
+ }
+ }
+ }
+ }
+
+ }
}
void LLLandmarksPanel::onMenuVisibilityChange(LLUICtrl* ctrl, const LLSD& param)
@@ -1148,29 +927,17 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
if (!item) return false;
- // nothing can be modified in Library
- if (mLibraryInventoryPanel == mCurrentSelectedList) return false;
-
bool can_be_modified = false;
// landmarks can be modified in any other accordion...
if (static_cast<LLFolderViewModelItemInventory*>(item->getViewModelItem())->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
can_be_modified = true;
-
- // we can modify landmarks anywhere except paste to My Inventory
- if ("paste" == command_name)
- {
- can_be_modified = (mCurrentSelectedList != mMyInventoryPanel);
- }
}
else
{
// ...folders only in the Landmarks accordion...
- can_be_modified = mLandmarksInventoryPanel == mCurrentSelectedList;
-
- // ...except "Received" folder
- can_be_modified &= !isReceivedFolderSelected();
+ can_be_modified = isLandmarksPanel;
}
// then ask LLFolderView permissions
@@ -1287,12 +1054,10 @@ void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark)
LLFloaterReg::showInstance("world_map", "center");
}
- mShowOnMapBtn->setEnabled(TRUE);
mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE);
}
void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark,
- LLFolderViewItem* cur_item,
LLInventoryItem* inv_item,
const LLParcelData& parcel_data)
{
@@ -1321,7 +1086,7 @@ void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark,
LLPickData data;
data.pos_global = landmark_global_pos;
- data.name = cur_item->getName();
+ data.name = inv_item->getName();
data.desc = inv_item->getDescription();
data.snapshot_id = parcel_data.snapshot_id;
data.parcel_id = parcel_data.parcel_id;
@@ -1341,11 +1106,13 @@ void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark,
panel_pick, panel_places,params));
}
-void LLLandmarksPanel::doCreatePick(LLLandmark* landmark)
+void LLLandmarksPanel::doCreatePick(LLLandmark* landmark, const LLUUID &item_id)
{
LLViewerRegion* region = gAgent.getRegion();
if (!region) return;
+ mCreatePickItemId = item_id;
+
LLGlobalVec pos_global;
LLUUID region_id;
landmark->getGlobalPos(pos_global);
@@ -1398,27 +1165,12 @@ static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::strin
inventory_list->setFilterSubString(string);
}
-static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list)
-{
- LLViewerInventoryCategory* category = gInventory.getCategory(inventory_list->getRootFolderID());
- if (category)
- {
- return category->getDescendentCount() > 0;
- }
-
- return false;
-}
-
static void collapse_all_folders(LLFolderView* root_folder)
{
if (!root_folder)
return;
root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
-
- // The top level folder is invisible, it must be open to
- // display its sub-folders.
- root_folder->openTopLevelFolders();
root_folder->arrangeAll();
}
@@ -1485,4 +1237,31 @@ void toggle_restore_menu(LLMenuGL *menu, BOOL visible, BOOL enabled)
}
}
}
+
+LLFavoritesPanel::LLFavoritesPanel()
+ : LLLandmarksPanel(false)
+{
+ buildFromFile("panel_favorites.xml");
+}
+
+BOOL LLFavoritesPanel::postBuild()
+{
+ if (!gInventory.isInventoryUsable())
+ return FALSE;
+
+ // mast be called before any other initXXX methods to init Gear menu
+ LLLandmarksPanel::initListCommandsHandlers();
+
+ initFavoritesInventoryPanel();
+
+ return TRUE;
+}
+
+void LLFavoritesPanel::initFavoritesInventoryPanel()
+{
+ mCurrentSelectedList = getChild<LLPlacesInventoryPanel>("favorites_list");
+
+ LLLandmarksPanel::initLandmarksPanel(mCurrentSelectedList);
+ mCurrentSelectedList->getFilter().setEmptyLookupMessage("FavoritesNoMatchingItems");
+}
// EOF
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index c11cbe05ae..d7408269b5 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -50,81 +50,69 @@ class LLLandmarksPanel : public LLPanelPlacesTab, LLRemoteParcelInfoObserver
{
public:
LLLandmarksPanel();
+ LLLandmarksPanel(bool is_landmark_panel);
virtual ~LLLandmarksPanel();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onSearchEdit(const std::string& string);
- /*virtual*/ void onShowOnMap();
- /*virtual*/ void onShowProfile();
- /*virtual*/ void onTeleport();
- /*virtual*/ void updateVerbs();
- /*virtual*/ bool isSingleItemSelected();
+ BOOL postBuild() override;
+ void onSearchEdit(const std::string& string) override;
+ void onShowOnMap() override;
+ void onShowProfile() override;
+ void onTeleport() override;
+ void onRemoveSelected() override;
+ void updateVerbs() override;
+ bool isSingleItemSelected() override;
+
+ LLToggleableMenu* getSelectionMenu() override;
+ LLToggleableMenu* getSortingMenu() override;
+ LLToggleableMenu* getCreateMenu() override;
+
+ /**
+ * Processes drag-n-drop of the Landmarks and folders into trash button.
+ */
+ bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override;
- void onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
- void onSelectorButtonClicked();
void setCurrentSelectedList(LLPlacesInventoryPanel* inventory_list)
{
mCurrentSelectedList = inventory_list;
}
/**
- * Update filter ShowFolderState setting to show empty folder message
- * if Landmarks inventory folder is empty.
- */
- void updateShowFolderState();
-
- /**
* Selects item with "obj_id" in one of accordion tabs.
*/
void setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus);
- LLPlacesInventoryPanel* getLibraryInventoryPanel() { return mLibraryInventoryPanel; }
-
void updateMenuVisibility(LLUICtrl* menu);
+ void doCreatePick(LLLandmark* landmark, const LLUUID &item_id );
+
+ void resetSelection();
+
protected:
/**
* @return true - if current selected panel is not null and selected item is a landmark
*/
bool isLandmarkSelected() const;
bool isFolderSelected() const;
- bool isReceivedFolderSelected() const;
void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb);
LLFolderViewItem* getCurSelectedItem() const;
LLFolderViewModelItemInventory* getCurSelectedViewModelItem() const;
- /**
- * Selects item with "obj_id" in "inventory_list" and scrolls accordion
- * scrollbar to show the item.
- * Returns pointer to the item if it is found in "inventory_list", otherwise NULL.
- */
- LLFolderViewItem* selectItemInAccordionTab(LLPlacesInventoryPanel* inventory_list,
- const std::string& tab_name,
- const LLUUID& obj_id,
- BOOL take_keyboard_focus) const;
-
void updateSortOrder(LLInventoryPanel* panel, bool byDate);
//LLRemoteParcelInfoObserver interface
- /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
- /*virtual*/ void setParcelID(const LLUUID& parcel_id);
- /*virtual*/ void setErrorStatus(S32 status, const std::string& reason);
+ void processParcelInfo(const LLParcelData& parcel_data) override;
+ void setParcelID(const LLUUID& parcel_id) override;
+ void setErrorStatus(S32 status, const std::string& reason) override;
+
+ // List Commands Handlers
+ void initListCommandsHandlers();
+ void initLandmarksPanel(LLPlacesInventoryPanel* inventory_list);
+
+ LLPlacesInventoryPanel* mCurrentSelectedList;
private:
- void initFavoritesInventoryPanel();
void initLandmarksInventoryPanel();
- void initMyInventoryPanel();
- void initLibraryInventoryPanel();
- void initLandmarksPanel(LLPlacesInventoryPanel* inventory_list);
- LLAccordionCtrlTab* initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list, bool expand_tab);
- void onAccordionExpandedCollapsed(const LLSD& param, LLPlacesInventoryPanel* inventory_list);
- void deselectOtherThan(const LLPlacesInventoryPanel* inventory_list);
- // List Commands Handlers
- void initListCommandsHandlers();
- void updateListCommands();
- void onActionsButtonClick();
- void showActionMenu(LLMenuGL* menu, std::string spawning_view_name);
void onTrashButtonClick() const;
void onAddAction(const LLSD& command_name) const;
void onClipboardAction(const LLSD& command_name) const;
@@ -151,38 +139,33 @@ private:
void onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* owner, const LLSD& params);
/**
- * Processes drag-n-drop of the Landmarks and folders into trash button.
- */
- bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept);
-
- /**
* Landmark actions callbacks. Fire when a landmark is loaded from the list.
*/
void doShowOnMap(LLLandmark* landmark);
void doProcessParcelInfo(LLLandmark* landmark,
- LLFolderViewItem* cur_item,
LLInventoryItem* inv_item,
const LLParcelData& parcel_data);
- void doCreatePick(LLLandmark* landmark);
private:
- LLPlacesInventoryPanel* mFavoritesInventoryPanel;
LLPlacesInventoryPanel* mLandmarksInventoryPanel;
- LLPlacesInventoryPanel* mMyInventoryPanel;
- LLPlacesInventoryPanel* mLibraryInventoryPanel;
- LLMenuButton* mGearButton;
LLToggleableMenu* mGearLandmarkMenu;
LLToggleableMenu* mGearFolderMenu;
- LLMenuGL* mMenuAdd;
- LLPlacesInventoryPanel* mCurrentSelectedList;
- LLInventoryObserver* mInventoryObserver;
+ LLToggleableMenu* mSortingMenu;
+ LLToggleableMenu* mAddMenu;
- LLPanel* mListCommands;
+ bool isLandmarksPanel;
- typedef std::vector<LLAccordionCtrlTab*> accordion_tabs_t;
- accordion_tabs_t mAccordionTabs;
+ LLUUID mCreatePickItemId; // item we requested a pick for
+};
- LLAccordionCtrlTab* mMyLandmarksAccordionTab;
+
+class LLFavoritesPanel : public LLLandmarksPanel
+{
+public:
+ LLFavoritesPanel();
+
+ BOOL postBuild() override;
+ void initFavoritesInventoryPanel();
};
#endif //LL_LLPANELLANDMARKS_H
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index fbc1b80857..e9c9c451a2 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -115,6 +115,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mSavedFolderState(NULL),
mFilterText(""),
mMenuGearDefault(NULL),
+ mMenuVisibility(NULL),
mMenuAddHandle(),
mNeedUploadCost(true)
{
@@ -219,6 +220,17 @@ BOOL LLPanelMainInventory::postBuild()
recent_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER));
}
}
+ if(mActivePanel)
+ {
+ if(savedFilterState.has(mActivePanel->getFilter().getName()))
+ {
+ LLSD items = savedFilterState.get(mActivePanel->getFilter().getName());
+ LLInventoryFilter::Params p;
+ LLParamSDParser parser;
+ parser.readSD(items, p);
+ mActivePanel->getFilter().setSearchVisibilityTypes(p);
+ }
+ }
}
@@ -229,6 +241,7 @@ BOOL LLPanelMainInventory::postBuild()
}
mGearMenuButton = getChild<LLMenuButton>("options_gear_btn");
+ mVisibilityMenuButton = getChild<LLMenuButton>("options_visibility_btn");
initListCommandsHandlers();
@@ -254,6 +267,9 @@ BOOL LLPanelMainInventory::postBuild()
LLPanelMainInventory::~LLPanelMainInventory( void )
{
// Save the filters state.
+ // Some params types cannot be saved this way
+ // for example, LLParamSDParser doesn't know about U64,
+ // so some FilterOps params should be revised.
LLSD filterRoot;
LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>("All Items");
if (all_items_panel)
@@ -1165,6 +1181,10 @@ void LLPanelMainInventory::initListCommandsHandlers()
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mMenuAddHandle = menu->getHandle();
+ mMenuVisibility = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_search_visibility.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mVisibilityMenuButton->setMenu(mMenuVisibility);
+ mVisibilityMenuButton->setMenuPosition(LLMenuButton::MP_BOTTOM_LEFT);
+
// Update the trash button when selected item(s) get worn or taken off.
LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this));
}
@@ -1354,6 +1374,21 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
}
LLFloaterReg::showInstance("linkreplace", params);
}
+
+ if (command_name == "toggle_search_trash")
+ {
+ mActivePanel->getFilter().toggleSearchVisibilityTrash();
+ }
+
+ if (command_name == "toggle_search_library")
+ {
+ mActivePanel->getFilter().toggleSearchVisibilityLibrary();
+ }
+
+ if (command_name == "include_links")
+ {
+ mActivePanel->getFilter().toggleSearchVisibilityLinks();
+ }
}
void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility )
@@ -1499,6 +1534,21 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata)
return sort_order_mask & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP;
}
+ if (command_name == "toggle_search_trash")
+ {
+ return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_TRASH) != 0;
+ }
+
+ if (command_name == "toggle_search_library")
+ {
+ return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LIBRARY) != 0;
+ }
+
+ if (command_name == "include_links")
+ {
+ return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LINKS) != 0;
+ }
+
return FALSE;
}
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index a6bdee233d..dfb8db9d12 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -93,6 +93,8 @@ public:
void toggleFindOptions();
+ void resetFilters();
+
protected:
//
// Misc functions
@@ -117,7 +119,6 @@ protected:
void doToSelected(const LLSD& userdata);
void closeAllFolders();
void doCreate(const LLSD& userdata);
- void resetFilters();
void setSortBy(const LLSD& userdata);
void saveTexture(const LLSD& userdata);
bool isSaveTextureEnabled(const LLSD& userdata);
@@ -169,7 +170,9 @@ protected:
private:
LLDragAndDropButton* mTrashButton;
LLToggleableMenu* mMenuGearDefault;
+ LLToggleableMenu* mMenuVisibility;
LLMenuButton* mGearMenuButton;
+ LLMenuButton* mVisibilityMenuButton;
LLHandle<LLView> mMenuAddHandle;
bool mNeedUploadCost;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 28a020870f..5be9ab6095 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -58,7 +58,6 @@
#include "llmenubutton.h"
#include "llpaneloutfitsinventory.h"
#include "lluiconstants.h"
-#include "llsaveoutfitcombobtn.h"
#include "llscrolllistctrl.h"
#include "lltextbox.h"
#include "lltoggleablemenu.h"
@@ -80,6 +79,8 @@ const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LL
const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK;
static const std::string REVERT_BTN("revert_btn");
+static const std::string SAVE_AS_BTN("save_as_btn");
+static const std::string SAVE_BTN("save_btn");
///////////////////////////////////////////////////////////////////////////////
@@ -562,7 +563,8 @@ BOOL LLPanelOutfitEdit::postBuild()
mGearMenu = LLPanelOutfitEditGearMenu::create();
mGearMenuBtn->setMenu(mGearMenu);
- mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
+ getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
+ getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
onOutfitChanging(gAgentWearables.isCOFChangeInProgress());
return TRUE;
@@ -1239,11 +1241,9 @@ void LLPanelOutfitEdit::updateVerbs()
bool outfit_locked = LLAppearanceMgr::getInstance()->isOutfitLocked();
bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull();
- mSaveComboBtn->setSaveBtnEnabled(!outfit_locked && outfit_is_dirty);
+ getChildView(SAVE_BTN)->setEnabled(!outfit_locked && outfit_is_dirty);
getChildView(REVERT_BTN)->setEnabled(outfit_is_dirty && has_baseoutfit);
- mSaveComboBtn->setMenuItemEnabled("save_outfit", !outfit_locked && outfit_is_dirty);
-
mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing"));
updateCurrentOutfitName();
@@ -1429,4 +1429,13 @@ void LLPanelOutfitEdit::saveListSelection()
}
}
+void LLPanelOutfitEdit::saveOutfit(bool as_new)
+{
+ LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance();
+ if (panel_outfits_inventory)
+ {
+ panel_outfits_inventory->saveOutfit(as_new);
+ }
+}
+
// EOF
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 8de3642b55..d0597fb72b 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -58,7 +58,6 @@ class LLMenuButton;
class LLMenuGL;
class LLFindNonLinksByMask;
class LLFindWearablesOfType;
-class LLSaveOutfitComboBtn;
class LLWearableItemTypeNameComparator;
class LLPanelOutfitEdit : public LLPanel
@@ -195,6 +194,7 @@ private:
void getSelectedItemsUUID(uuid_vec_t& uuid_list);
void getCurrentItemUUID(LLUUID& selected_id);
void onCOFChanged();
+ void saveOutfit(bool as_new = false);
/**
* Method preserves selection while switching between folder/list view modes
@@ -237,7 +237,6 @@ private:
LLToggleableMenu* mGearMenu;
LLToggleableMenu* mAddWearablesGearMenu;
bool mInitialized;
- std::unique_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
LLMenuButton* mWearablesGearMenuBtn;
LLMenuButton* mGearMenuBtn;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 8fff52ca4e..531073526b 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -40,7 +40,6 @@
#include "lloutfitgallery.h"
#include "lloutfitslist.h"
#include "llpanelwearing.h"
-#include "llsaveoutfitcombobtn.h"
#include "llsidepanelappearance.h"
#include "llviewercontrol.h"
#include "llviewerfoldertype.h"
@@ -49,6 +48,9 @@ static const std::string OUTFITS_TAB_NAME = "outfitslist_tab";
static const std::string OUTFIT_GALLERY_TAB_NAME = "outfit_gallery_tab";
static const std::string COF_TAB_NAME = "cof_tab";
+static const std::string SAVE_AS_BTN("save_as_btn");
+static const std::string SAVE_BTN("save_btn");
+
static LLPanelInjector<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
@@ -90,8 +92,9 @@ BOOL LLPanelOutfitsInventory::postBuild()
{
LLInventoryModelBackgroundFetch::instance().start(outfits_cat);
}
-
- mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this, true));
+
+ getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, false));
+ getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, true));
return TRUE;
}
@@ -246,6 +249,12 @@ LLPanelOutfitsInventory* LLPanelOutfitsInventory::findInstance()
return dynamic_cast<LLPanelOutfitsInventory*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfits_inventory"));
}
+void LLPanelOutfitsInventory::openApearanceTab(const std::string& tab_name)
+{
+ if (!mAppearanceTabs) return;
+ mAppearanceTabs->selectTabByName(tab_name);
+}
+
//////////////////////////////////////////////////////////////////////////////////
// List Commands //
@@ -269,7 +278,7 @@ void LLPanelOutfitsInventory::updateListCommands()
mOutfitGalleryPanel->childSetEnabled("trash_btn", trash_enabled);
wear_btn->setEnabled(wear_enabled);
wear_btn->setVisible(wear_visible);
- mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled);
+ getChild<LLButton>(SAVE_BTN)->setEnabled(make_outfit_enabled);
wear_btn->setToolTip(getString((!isOutfitsGalleryPanelActive() && mMyOutfitsPanel->hasItemSelected()) ? "wear_items_tooltip" : "wear_outfit_tooltip"));
}
@@ -368,3 +377,15 @@ LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP()
dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
return panel_appearance;
}
+
+void LLPanelOutfitsInventory::saveOutfit(bool as_new)
+{
+ if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
+ {
+ // we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved.
+ // If updateBaseOutfit fails, ask for an outfit name anyways
+ return;
+ }
+
+ onSave();
+}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index fea789c04c..50d7074d4b 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -38,7 +38,6 @@ class LLPanelWearing;
class LLMenuGL;
class LLSidepanelAppearance;
class LLTabContainer;
-class LLSaveOutfitComboBtn;
class LLPanelOutfitsInventory : public LLPanel
{
@@ -52,6 +51,7 @@ public:
void onSearchEdit(const std::string& string);
void onSave();
+ void saveOutfit(bool as_new = false);
bool onSaveCommit(const LLSD& notification, const LLSD& response);
@@ -59,13 +59,14 @@ public:
static LLPanelOutfitsInventory* findInstance();
+ void openApearanceTab(const std::string& tab_name);
+
protected:
void updateVerbs();
private:
LLTabContainer* mAppearanceTabs;
std::string mFilterSubString;
- std::unique_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
//////////////////////////////////////////////////////////////////////////////////
// tab panels //
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index e5142f2b5f..5997d522c4 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -661,6 +661,7 @@ BOOL LLPanelPeople::postBuild()
mRecentList->setShowIcons("RecentListShowIcons");
mGroupList = getChild<LLGroupList>("group_list");
+ mGroupList->setNoItemsCommentText(getString("no_groups_msg"));
mGroupList->setNoItemsMsg(getString("no_groups_msg"));
mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg"));
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 53870fb5c7..9c67ec40fe 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -53,6 +53,7 @@
#include "llagentpicksinfo.h"
#include "llavatarpropertiesprocessor.h"
#include "llcommandhandler.h"
+#include "lldndbutton.h"
#include "llfloaterworldmap.h"
#include "llinventorybridge.h"
#include "llinventoryobserver.h"
@@ -79,6 +80,7 @@
static const F32 PLACE_INFO_UPDATE_INTERVAL = 3.0;
static const std::string AGENT_INFO_TYPE = "agent";
static const std::string CREATE_LANDMARK_INFO_TYPE = "create_landmark";
+static const std::string CREATE_PICK_TYPE = "create_pick";
static const std::string LANDMARK_INFO_TYPE = "landmark";
static const std::string REMOTE_PLACE_INFO_TYPE = "remote_place";
static const std::string TELEPORT_HISTORY_INFO_TYPE = "teleport_history";
@@ -293,8 +295,25 @@ BOOL LLPanelPlaces::postBuild()
mOverflowBtn = getChild<LLMenuButton>("overflow_btn");
mOverflowBtn->setMouseDownCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this));
- mPlaceInfoBtn = getChild<LLButton>("profile_btn");
- mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this));
+ mGearMenuButton = getChild<LLMenuButton>("options_gear_btn");
+ mGearMenuButton->setMouseDownCallback(boost::bind(&LLPanelPlaces::onGearMenuClick, this));
+
+ mSortingMenuButton = getChild<LLMenuButton>("sorting_menu_btn");
+ mSortingMenuButton->setMouseDownCallback(boost::bind(&LLPanelPlaces::onSortingMenuClick, this));
+
+ mAddMenuButton = getChild<LLMenuButton>("add_menu_btn");
+ mAddMenuButton->setMouseDownCallback(boost::bind(&LLPanelPlaces::onAddMenuClick, this));
+
+ mRemoveSelectedBtn = getChild<LLButton>("trash_btn");
+ mRemoveSelectedBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onRemoveButtonClicked, this));
+
+ LLDragAndDropButton* trash_btn = (LLDragAndDropButton*)mRemoveSelectedBtn;
+ trash_btn->setDragAndDropHandler(boost::bind(&LLPanelPlaces::handleDragAndDropToTrash, this
+ , _4 // BOOL drop
+ , _5 // EDragAndDropType cargo_type
+ , _6 // void* cargo_data
+ , _7 // EAcceptance* accept
+ ));
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("Places.OverflowMenu.Action", boost::bind(&LLPanelPlaces::onOverflowMenuItemClicked, this, _2));
@@ -323,6 +342,10 @@ BOOL LLPanelPlaces::postBuild()
mTabContainer->setCommitCallback(boost::bind(&LLPanelPlaces::onTabSelected, this));
}
+ mButtonsContainer = getChild<LLPanel>("button_layout_panel");
+ mButtonsContainer->setVisible(FALSE);
+ mFilterContainer = getChild<LLLayoutStack>("top_menu_panel");
+
mFilterEditor = getChild<LLFilterEditor>("Filter");
if (mFilterEditor)
{
@@ -388,7 +411,22 @@ void LLPanelPlaces::onOpen(const LLSD& key)
// Update the buttons at the bottom of the panel
updateVerbs();
}
- else
+ else if (key_type == CREATE_PICK_TYPE)
+ {
+ LLUUID item_id = key["item_id"];
+
+ LLLandmarksPanel* landmarks_panel =
+ dynamic_cast<LLLandmarksPanel*>(mTabContainer->getPanelByName("Landmarks"));
+ if (landmarks_panel && item_id.notNull())
+ {
+ LLLandmark* landmark = LLLandmarkActions::getLandmark(item_id, boost::bind(&LLLandmarksPanel::doCreatePick, landmarks_panel, _1, item_id));
+ if (landmark)
+ {
+ landmarks_panel->doCreatePick(landmark, item_id);
+ }
+ }
+ }
+ else // "create_landmark"
{
mFilterEditor->clear();
onFilterEdit("", false);
@@ -409,7 +447,8 @@ void LLPanelPlaces::onOpen(const LLSD& key)
}
else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
{
- mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
+ LLUUID dest_folder = key["dest_folder"];
+ mLandmarkInfo->setInfoAndCreateLandmark(dest_folder);
if (key.has("x") && key.has("y") && key.has("z"))
{
@@ -612,6 +651,23 @@ void LLPanelPlaces::onTabSelected()
onFilterEdit(mActivePanel->getFilterSubString(), true);
mActivePanel->updateVerbs();
+
+ // History panel does not support deletion nor creation
+ // Hide menus
+ bool supports_create = mActivePanel->getCreateMenu() != NULL;
+ childSetVisible("add_btn_panel", supports_create);
+
+ // favorites and inventory can remove items, history can clear history
+ childSetVisible("trash_btn_panel", TRUE);
+
+ if (supports_create)
+ {
+ mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_items"));
+ }
+ else
+ {
+ mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_history"));
+ }
}
void LLPanelPlaces::onTeleportButtonClicked()
@@ -728,34 +784,6 @@ void LLPanelPlaces::onEditButtonClicked()
updateVerbs();
}
-class LLUpdateLandmarkParent : public LLInventoryCallback
-{
-public:
- LLUpdateLandmarkParent(LLPointer<LLViewerInventoryItem> item, LLUUID new_parent) :
- mItem(item),
- mNewParentId(new_parent)
- {};
- /* virtual */ void fire(const LLUUID& inv_item_id)
- {
- LLInventoryModel::update_list_t update;
- LLInventoryModel::LLCategoryUpdate old_folder(mItem->getParentUUID(), -1);
- update.push_back(old_folder);
- LLInventoryModel::LLCategoryUpdate new_folder(mNewParentId, 1);
- update.push_back(new_folder);
- gInventory.accountForUpdate(update);
-
- mItem->setParent(mNewParentId);
- mItem->updateParentOnServer(FALSE);
-
- gInventory.updateItem(mItem);
- gInventory.notifyObservers();
- }
-
-private:
- LLPointer<LLViewerInventoryItem> mItem;
- LLUUID mNewParentId;
-};
-
void LLPanelPlaces::onSaveButtonClicked()
{
if (!mLandmarkInfo || mItem.isNull())
@@ -885,14 +913,6 @@ void LLPanelPlaces::onOverflowButtonClicked()
mOverflowBtn->setMenu(menu, LLMenuButton::MP_TOP_RIGHT);
}
-void LLPanelPlaces::onProfileButtonClicked()
-{
- if (!mActivePanel)
- return;
-
- mActivePanel->onShowProfile();
-}
-
bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param)
{
std::string value = param.asString();
@@ -981,6 +1001,50 @@ void LLPanelPlaces::onBackButtonClicked()
updateVerbs();
}
+void LLPanelPlaces::onGearMenuClick()
+{
+ if (mActivePanel)
+ {
+ LLToggleableMenu* menu = mActivePanel->getSelectionMenu();
+ mGearMenuButton->setMenu(menu, LLMenuButton::MP_BOTTOM_LEFT);
+ }
+}
+
+void LLPanelPlaces::onSortingMenuClick()
+{
+ if (mActivePanel)
+ {
+ LLToggleableMenu* menu = mActivePanel->getSortingMenu();
+ mSortingMenuButton->setMenu(menu, LLMenuButton::MP_BOTTOM_LEFT);
+ }
+}
+
+void LLPanelPlaces::onAddMenuClick()
+{
+ if (mActivePanel)
+ {
+ LLToggleableMenu* menu = mActivePanel->getCreateMenu();
+ mAddMenuButton->setMenu(menu, LLMenuButton::MP_BOTTOM_LEFT);
+ }
+}
+
+void LLPanelPlaces::onRemoveButtonClicked()
+{
+ if (mActivePanel)
+ {
+ mActivePanel->onRemoveSelected();
+ }
+}
+
+bool LLPanelPlaces::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept)
+{
+ if (mActivePanel)
+ {
+ return mActivePanel->handleDragAndDropToTrash(drop, cargo_type, cargo_data, accept);
+ }
+ return false;
+}
+
void LLPanelPlaces::togglePickPanel(BOOL visible)
{
if (mPickPanel)
@@ -997,8 +1061,9 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
if (!mPlaceProfile || !mLandmarkInfo)
return;
- mFilterEditor->setVisible(!visible);
mTabContainer->setVisible(!visible);
+ mButtonsContainer->setVisible(visible);
+ mFilterContainer->setVisible(!visible);
if (mPlaceInfoType == AGENT_INFO_TYPE ||
mPlaceInfoType == REMOTE_PLACE_INFO_TYPE ||
@@ -1014,10 +1079,6 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
// to avoid text blinking.
mResetInfoTimer.setTimerExpirySec(PLACE_INFO_UPDATE_INTERVAL);
- LLRect rect = getRect();
- LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom);
- mPlaceProfile->reshape(new_rect.getWidth(), new_rect.getHeight());
-
mLandmarkInfo->setVisible(FALSE);
}
else if (mPlaceInfoType == AGENT_INFO_TYPE)
@@ -1038,15 +1099,19 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
if (visible)
{
mLandmarkInfo->resetLocation();
-
- LLRect rect = getRect();
- LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom);
- mLandmarkInfo->reshape(new_rect.getWidth(), new_rect.getHeight());
}
else
{
- LLLandmarksPanel* landmarks_panel =
- dynamic_cast<LLLandmarksPanel*>(mTabContainer->getPanelByName("Landmarks"));
+ std::string tab_panel_name("Landmarks");
+ if (mItem.notNull())
+ {
+ if (gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)))
+ {
+ tab_panel_name = "Favorites";
+ }
+ }
+
+ LLLandmarksPanel* landmarks_panel = dynamic_cast<LLLandmarksPanel*>(mTabContainer->getPanelByName(tab_panel_name));
if (landmarks_panel)
{
// If a landmark info is being closed we open the landmarks tab
@@ -1056,6 +1121,10 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
{
landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
}
+ else
+ {
+ landmarks_panel->resetSelection();
+ }
}
}
}
@@ -1123,11 +1192,19 @@ void LLPanelPlaces::createTabs()
if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance() && !mTabsCreated))
return;
+ LLFavoritesPanel* favorites_panel = new LLFavoritesPanel();
+ if (favorites_panel)
+ {
+ mTabContainer->addTabPanel(
+ LLTabContainer::TabPanelParams().
+ panel(favorites_panel).
+ label(getString("favorites_tab_title")).
+ insert_at(LLTabContainer::END));
+ }
+
LLLandmarksPanel* landmarks_panel = new LLLandmarksPanel();
if (landmarks_panel)
{
- landmarks_panel->setPanelPlacesButtons(this);
-
mTabContainer->addTabPanel(
LLTabContainer::TabPanelParams().
panel(landmarks_panel).
@@ -1138,8 +1215,6 @@ void LLPanelPlaces::createTabs()
LLTeleportHistoryPanel* teleport_history_panel = new LLTeleportHistoryPanel();
if (teleport_history_panel)
{
- teleport_history_panel->setPanelPlacesButtons(this);
-
mTabContainer->addTabPanel(
LLTabContainer::TabPanelParams().
panel(teleport_history_panel).
@@ -1151,9 +1226,31 @@ void LLPanelPlaces::createTabs()
mActivePanel = dynamic_cast<LLPanelPlacesTab*>(mTabContainer->getCurrentPanel());
- // Filter applied to show all items.
- if (mActivePanel)
- mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
+ if (mActivePanel)
+ {
+ // Filter applied to show all items.
+ mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
+
+ // History panel does not support deletion nor creation
+ // Hide menus
+ bool supports_create = mActivePanel->getCreateMenu() != NULL;
+ childSetVisible("add_btn_panel", supports_create);
+
+ // favorites and inventory can remove items, history can clear history
+ childSetVisible("trash_btn_panel", TRUE);
+
+ if (supports_create)
+ {
+ mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_items"));
+ }
+ else
+ {
+ mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_history"));
+ }
+
+ mActivePanel->setRemoveBtn(mRemoveSelectedBtn);
+ mActivePanel->updateVerbs();
+ }
mTabsCreated = true;
}
@@ -1219,15 +1316,12 @@ void LLPanelPlaces::updateVerbs()
mSaveBtn->setVisible(isLandmarkEditModeOn);
mCancelBtn->setVisible(isLandmarkEditModeOn);
mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn);
- mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible);
bool show_options_btn = is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn;
mOverflowBtn->setVisible(show_options_btn);
getChild<LLLayoutPanel>("lp_options")->setVisible(show_options_btn);
getChild<LLLayoutPanel>("lp2")->setVisible(!show_options_btn);
- mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
-
if (is_place_info_visible)
{
mShowOnMapBtn->setEnabled(have_3d_pos);
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 978b030b2e..3b87eb6cb9 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -48,6 +48,7 @@ class LLRemoteParcelInfoObserver;
class LLTabContainer;
class LLToggleableMenu;
class LLMenuButton;
+class LLLayoutStack;
typedef std::pair<LLUUID, std::string> folder_pair_t;
@@ -96,7 +97,12 @@ private:
bool onOverflowMenuItemEnable(const LLSD& param);
void onCreateLandmarkButtonClicked(const LLUUID& folder_id);
void onBackButtonClicked();
- void onProfileButtonClicked();
+ void onGearMenuClick();
+ void onSortingMenuClick();
+ void onAddMenuClick();
+ void onRemoveButtonClicked();
+ bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept);
+
void toggleMediaPanel();
void togglePickPanel(BOOL visible);
@@ -111,6 +117,8 @@ private:
LLFilterEditor* mFilterEditor;
LLPanelPlacesTab* mActivePanel;
LLTabContainer* mTabContainer;
+ LLPanel* mButtonsContainer;
+ LLLayoutStack* mFilterContainer;
LLPanelPlaceProfile* mPlaceProfile;
LLPanelLandmarkInfo* mLandmarkInfo;
@@ -125,7 +133,12 @@ private:
LLButton* mCancelBtn;
LLButton* mCloseBtn;
LLMenuButton* mOverflowBtn;
- LLButton* mPlaceInfoBtn;
+
+ // Top menu
+ LLMenuButton* mGearMenuButton;
+ LLMenuButton* mSortingMenuButton;
+ LLMenuButton* mAddMenuButton;
+ LLButton* mRemoveSelectedBtn;
LLPlacesInventoryObserver* mInventoryObserver;
LLPlacesParcelObserver* mParcelObserver;
diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp
index 9644b7518e..748a917147 100644
--- a/indra/newview/llpanelplacestab.cpp
+++ b/indra/newview/llpanelplacestab.cpp
@@ -38,6 +38,7 @@
#include "llworldmap.h"
std::string LLPanelPlacesTab::sFilterSubString = LLStringUtil::null;
+LLButton* LLPanelPlacesTab::sRemoveBtn = NULL;
bool LLPanelPlacesTab::isTabVisible()
{
@@ -47,13 +48,6 @@ bool LLPanelPlacesTab::isTabVisible()
return true;
}
-void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel)
-{
- mTeleportBtn = panel->getChild<LLButton>("teleport_btn");
- mShowOnMapBtn = panel->getChild<LLButton>("map_btn");
- mShowProfile = panel->getChild<LLButton>("profile_btn");
-}
-
void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos,
U64 region_handle,
const std::string& url,
diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h
index 367ce46e2e..aab1c130c1 100644
--- a/indra/newview/llpanelplacestab.h
+++ b/indra/newview/llpanelplacestab.h
@@ -30,6 +30,7 @@
#include "llpanel.h"
class LLPanelPlaces;
+class LLToggleableMenu;
class LLPanelPlacesTab : public LLPanel
{
@@ -42,11 +43,21 @@ public:
virtual void onShowOnMap() = 0;
virtual void onShowProfile() = 0;
virtual void onTeleport() = 0;
+ virtual void onRemoveSelected() = 0;
virtual bool isSingleItemSelected() = 0;
+ // returns menu for current selection
+ virtual LLToggleableMenu* getSelectionMenu() = 0;
+ virtual LLToggleableMenu* getSortingMenu() = 0;
+ virtual LLToggleableMenu* getCreateMenu() = 0;
+
+ /**
+ * Processes drag-n-drop of the Landmarks and folders into trash button.
+ */
+ virtual bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) = 0;
+
bool isTabVisible(); // Check if parent TabContainer is visible.
- void setPanelPlacesButtons(LLPanelPlaces* panel);
void onRegionResponse(const LLVector3d& landmark_global_pos,
U64 region_handle,
const std::string& url,
@@ -56,13 +67,12 @@ public:
const std::string& getFilterSubString() { return sFilterSubString; }
void setFilterSubString(const std::string& string) { sFilterSubString = string; }
-protected:
- LLButton* mTeleportBtn;
- LLButton* mShowOnMapBtn;
- LLButton* mShowProfile;
+ void setRemoveBtn(LLButton* trash_btn) { sRemoveBtn = trash_btn; }
+protected:
// Search string for filtering landmarks and teleport history locations
static std::string sFilterSubString;
+ static LLButton* sRemoveBtn;
};
#endif //LL_LLPANELPLACESTAB_H
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index fe0608d544..b938b30479 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -56,7 +56,7 @@ static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
class LLTeleportHistoryFlatItem : public LLPanel
{
public:
- LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name,
+ LLTeleportHistoryFlatItem(S32 index, LLToggleableMenu *menu, const std::string &region_name,
LLDate date, const std::string &hl);
virtual ~LLTeleportHistoryFlatItem();
@@ -86,12 +86,13 @@ public:
private:
void onProfileBtnClick();
+ void showMenu(S32 x, S32 y);
LLButton* mProfileBtn;
LLTextBox* mTitle;
LLTextBox* mTimeTextBox;
- LLTeleportHistoryPanel::ContextMenu *mContextMenu;
+ LLToggleableMenu *mMenu;
S32 mIndex;
std::string mRegionName;
@@ -112,7 +113,7 @@ protected:
public:
LLTeleportHistoryFlatItem* getFlatItemForPersistentItem (
- LLTeleportHistoryPanel::ContextMenu *context_menu,
+ LLToggleableMenu *menu,
const LLTeleportHistoryPersistentItem& persistent_item,
const S32 cur_item_index,
const std::string &hl);
@@ -130,16 +131,16 @@ private:
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name,
+LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLToggleableMenu *menu, const std::string &region_name,
LLDate date, const std::string &hl)
: LLPanel(),
mIndex(index),
- mContextMenu(context_menu),
+ mMenu(menu),
mRegionName(region_name),
mDate(date),
mHighlight(hl)
{
- buildFromFile( "panel_teleport_history_item.xml");
+ buildFromFile("panel_teleport_history_item.xml");
}
LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem()
@@ -266,10 +267,9 @@ void LLTeleportHistoryFlatItem::onMouseLeave(S32 x, S32 y, MASK mask)
// virtual
BOOL LLTeleportHistoryFlatItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- if (mContextMenu)
- mContextMenu->show(this, mIndex, x, y);
-
- return LLPanel::handleRightMouseDown(x, y, mask);
+ LLPanel::handleRightMouseDown(x, y, mask);
+ showMenu(x, y);
+ return TRUE;
}
void LLTeleportHistoryFlatItem::showPlaceInfoPanel(S32 index)
@@ -286,13 +286,23 @@ void LLTeleportHistoryFlatItem::onProfileBtnClick()
LLTeleportHistoryFlatItem::showPlaceInfoPanel(mIndex);
}
+void LLTeleportHistoryFlatItem::showMenu(S32 x, S32 y)
+{
+ mMenu->setButtonRect(this);
+ mMenu->buildDrawLabels();
+ mMenu->arrangeAndClear();
+ mMenu->updateParent(LLMenuGL::sMenuContainer);
+
+ LLMenuGL::showPopup(this, mMenu, x, y);
+}
+
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
LLTeleportHistoryFlatItem*
LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem (
- LLTeleportHistoryPanel::ContextMenu *context_menu,
+ LLToggleableMenu *menu,
const LLTeleportHistoryPersistentItem& persistent_item,
const S32 cur_item_index,
const std::string &hl)
@@ -321,7 +331,7 @@ LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem (
if ( !item )
{
item = new LLTeleportHistoryFlatItem(cur_item_index,
- context_menu,
+ menu,
persistent_item.mTitle,
persistent_item.mDate,
hl);
@@ -365,74 +375,6 @@ void LLTeleportHistoryFlatItemStorage::purge()
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-LLTeleportHistoryPanel::ContextMenu::ContextMenu() :
- mMenu(NULL), mIndex(0)
-{
-}
-
-void LLTeleportHistoryPanel::ContextMenu::show(LLView* spawning_view, S32 index, S32 x, S32 y)
-{
- if (mMenu)
- {
- //preventing parent (menu holder) from deleting already "dead" context menus on exit
- LLView* parent = mMenu->getParent();
- if (parent)
- {
- parent->removeChild(mMenu);
- }
- delete mMenu;
- }
-
- mIndex = index;
- mMenu = createMenu();
-
- mMenu->show(x, y);
- LLMenuGL::showPopup(spawning_view, mMenu, x, y);
-}
-
-LLContextMenu* LLTeleportHistoryPanel::ContextMenu::createMenu()
-{
- // set up the callbacks for all of the avatar menu items
- // (N.B. callbacks don't take const refs as mID is local scope)
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-
- registrar.add("TeleportHistory.Teleport", boost::bind(&LLTeleportHistoryPanel::ContextMenu::onTeleport, this));
- registrar.add("TeleportHistory.MoreInformation",boost::bind(&LLTeleportHistoryPanel::ContextMenu::onInfo, this));
- registrar.add("TeleportHistory.CopyToClipboard",boost::bind(&LLTeleportHistoryPanel::ContextMenu::onCopyToClipboard, this));
-
- // create the context menu from the XUI
- llassert(LLMenuGL::sMenuContainer != NULL);
- return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
- "menu_teleport_history_item.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
-}
-
-void LLTeleportHistoryPanel::ContextMenu::onTeleport()
-{
- confirmTeleport(mIndex);
-}
-
-void LLTeleportHistoryPanel::ContextMenu::onInfo()
-{
- LLTeleportHistoryFlatItem::showPlaceInfoPanel(mIndex);
-}
-
-//static
-void LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback(const std::string& slurl)
-{
- LLClipboard::instance().copyToClipboard(utf8str_to_wstring(slurl),0,slurl.size());
-
- LLSD args;
- args["SLURL"] = slurl;
-
- LLNotificationsUtil::add("CopySLURL", args);
-}
-
-void LLTeleportHistoryPanel::ContextMenu::onCopyToClipboard()
-{
- LLVector3d globalPos = LLTeleportHistoryStorage::getInstance()->getItems()[mIndex].mGlobalPos;
- LLLandmarkActions::getSLURLfromPosGlobal(globalPos,
- boost::bind(&LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback, _1));
-}
// Not yet implemented; need to remove buildPanel() from constructor when we switch
//static LLRegisterPanelClassWrapper<LLTeleportHistoryPanel> t_teleport_history("panel_teleport_history");
@@ -446,7 +388,8 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel()
mAccordionTabMenu(NULL),
mLastSelectedFlatlList(NULL),
mLastSelectedItemIndex(-1),
- mMenuGearButton(NULL)
+ mGearItemMenu(NULL),
+ mSortingMenu(NULL)
{
buildFromFile( "panel_teleport_history.xml");
}
@@ -454,12 +397,19 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel()
LLTeleportHistoryPanel::~LLTeleportHistoryPanel()
{
LLTeleportHistoryFlatItemStorage::instance().purge();
- if (mGearMenuHandle.get()) mGearMenuHandle.get()->die();
mTeleportHistoryChangedConnection.disconnect();
}
BOOL LLTeleportHistoryPanel::postBuild()
{
+ mCommitCallbackRegistrar.add("TeleportHistory.GearMenu.Action", boost::bind(&LLTeleportHistoryPanel::onGearMenuAction, this, _2));
+ mEnableCallbackRegistrar.add("TeleportHistory.GearMenu.Enable", boost::bind(&LLTeleportHistoryPanel::isActionEnabled, this, _2));
+
+ // init menus before list, since menus are passed to list
+ mGearItemMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_item.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mGearItemMenu->setAlwaysShowMenu(TRUE); // all items can be disabled if nothing is selected, show anyway
+ mSortingMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
mTeleportHistory = LLTeleportHistoryStorage::getInstance();
if (mTeleportHistory)
{
@@ -511,22 +461,6 @@ BOOL LLTeleportHistoryPanel::postBuild()
}
}
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-
- registrar.add("TeleportHistory.ExpandAllFolders", boost::bind(&LLTeleportHistoryPanel::onExpandAllFolders, this));
- registrar.add("TeleportHistory.CollapseAllFolders", boost::bind(&LLTeleportHistoryPanel::onCollapseAllFolders, this));
- registrar.add("TeleportHistory.ClearTeleportHistory", boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistory, this));
- mEnableCallbackRegistrar.add("TeleportHistory.GearMenu.Enable", boost::bind(&LLTeleportHistoryPanel::isActionEnabled, this, _2));
-
- mMenuGearButton = getChild<LLMenuButton>("gear_btn");
-
- LLToggleableMenu* gear_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());;
- if(gear_menu)
- {
- mGearMenuHandle = gear_menu->getHandle();
- mMenuGearButton->setMenu(gear_menu);
- }
-
return TRUE;
}
@@ -600,6 +534,12 @@ void LLTeleportHistoryPanel::onTeleport()
confirmTeleport(itemp->getIndex());
}
+// virtual
+void LLTeleportHistoryPanel::onRemoveSelected()
+{
+ LLNotificationsUtil::add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
+}
+
/*
// virtual
void LLTeleportHistoryPanel::onCopySLURL()
@@ -630,19 +570,28 @@ void LLTeleportHistoryPanel::updateVerbs()
if (!isTabVisible())
return;
- if (!mLastSelectedFlatlList)
+ if (sRemoveBtn)
{
- mTeleportBtn->setEnabled(false);
- mShowProfile->setEnabled(false);
- mShowOnMapBtn->setEnabled(false);
- return;
+ sRemoveBtn->setEnabled(true);
}
+}
- LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
+// virtual
+LLToggleableMenu* LLTeleportHistoryPanel::getSelectionMenu()
+{
+ return mGearItemMenu;
+}
+
+// virtual
+LLToggleableMenu* LLTeleportHistoryPanel::getSortingMenu()
+{
+ return mSortingMenu;
+}
- mTeleportBtn->setEnabled(NULL != itemp);
- mShowProfile->setEnabled(NULL != itemp);
- mShowOnMapBtn->setEnabled(NULL != itemp);
+// virtual
+LLToggleableMenu* LLTeleportHistoryPanel::getCreateMenu()
+{
+ return NULL;
}
void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date)
@@ -778,7 +727,7 @@ void LLTeleportHistoryPanel::refresh()
{
LLTeleportHistoryFlatItem* item =
LLTeleportHistoryFlatItemStorage::instance()
- .getFlatItemForPersistentItem(&mContextMenu,
+ .getFlatItemForPersistentItem(mGearItemMenu,
items[mCurrentItem],
mCurrentItem,
filter_string);
@@ -847,7 +796,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
const LLTeleportHistoryStorage::slurl_list_t& history_items = mTeleportHistory->getItems();
LLTeleportHistoryFlatItem* item = LLTeleportHistoryFlatItemStorage::instance()
- .getFlatItemForPersistentItem(&mContextMenu,
+ .getFlatItemForPersistentItem(mGearItemMenu,
history_items[history_items.size() - 1], // Most recent item, it was added instead of removed
history_items.size(), // index will be decremented inside loop below
sFilterSubString);
@@ -1019,38 +968,6 @@ void LLTeleportHistoryPanel::onAccordionTabClose(LLAccordionCtrlTab *tab)
mHistoryAccordion->arrange();
}
-void LLTeleportHistoryPanel::onExpandAllFolders()
-{
- S32 tabs_cnt = mItemContainers.size();
-
- for (S32 n = 0; n < tabs_cnt; n++)
- {
- mItemContainers.at(n)->setDisplayChildren(true);
- }
- mHistoryAccordion->arrange();
-}
-
-void LLTeleportHistoryPanel::onCollapseAllFolders()
-{
- S32 tabs_cnt = mItemContainers.size();
-
- for (S32 n = 0; n < tabs_cnt; n++)
- {
- mItemContainers.at(n)->setDisplayChildren(false);
- }
- mHistoryAccordion->arrange();
-
- if (mLastSelectedFlatlList)
- {
- mLastSelectedFlatlList->resetSelection();
- }
-}
-
-void LLTeleportHistoryPanel::onClearTeleportHistory()
-{
- LLNotificationsUtil::add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
-}
-
bool LLTeleportHistoryPanel::onClearTeleportHistoryDialog(const LLSD& notification, const LLSD& response)
{
@@ -1082,45 +999,137 @@ LLFlatListView* LLTeleportHistoryPanel::getFlatListViewFromTab(LLAccordionCtrlTa
return NULL;
}
-bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
+void LLTeleportHistoryPanel::gotSLURLCallback(const std::string& slurl)
{
- S32 tabs_cnt = mItemContainers.size();
-
- bool has_expanded_tabs = false;
- bool has_collapsed_tabs = false;
-
- for (S32 n = 0; n < tabs_cnt; n++)
- {
- LLAccordionCtrlTab* tab = mItemContainers.at(n);
- if (!tab->getVisible())
- continue;
-
- if (tab->getDisplayChildren())
- {
- has_expanded_tabs = true;
- }
- else
- {
- has_collapsed_tabs = true;
- }
+ LLClipboard::instance().copyToClipboard(utf8str_to_wstring(slurl), 0, slurl.size());
- if (has_expanded_tabs && has_collapsed_tabs)
- {
- break;
- }
- }
+ LLSD args;
+ args["SLURL"] = slurl;
- std::string command_name = userdata.asString();
+ LLNotificationsUtil::add("CopySLURL", args);
+}
- if (has_expanded_tabs && command_name == "collapse_all")
- {
- return true;
- }
+void LLTeleportHistoryPanel::onGearMenuAction(const LLSD& userdata)
+{
+ std::string command_name = userdata.asString();
+
+ if ("expand_all" == command_name)
+ {
+ S32 tabs_cnt = mItemContainers.size();
+
+ for (S32 n = 0; n < tabs_cnt; n++)
+ {
+ mItemContainers.at(n)->setDisplayChildren(true);
+ }
+ mHistoryAccordion->arrange();
+ }
+ else if ("collapse_all" == command_name)
+ {
+ S32 tabs_cnt = mItemContainers.size();
+
+ for (S32 n = 0; n < tabs_cnt; n++)
+ {
+ mItemContainers.at(n)->setDisplayChildren(false);
+ }
+ mHistoryAccordion->arrange();
+
+ if (mLastSelectedFlatlList)
+ {
+ mLastSelectedFlatlList->resetSelection();
+ }
+ }
+
+ S32 index = -1;
+ if (mLastSelectedFlatlList)
+ {
+ LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
+ if (itemp)
+ {
+ index = itemp->getIndex();
+ }
+ }
+
+ if ("teleport" == command_name)
+ {
+ confirmTeleport(index);
+ }
+ else if ("view" == command_name)
+ {
+ LLTeleportHistoryFlatItem::showPlaceInfoPanel(index);
+ }
+ else if ("show_on_map" == command_name)
+ {
+ LLTeleportHistoryStorage::getInstance()->showItemOnMap(index);
+ }
+ else if ("copy_slurl" == command_name)
+ {
+ LLVector3d globalPos = LLTeleportHistoryStorage::getInstance()->getItems()[index].mGlobalPos;
+ LLLandmarkActions::getSLURLfromPosGlobal(globalPos,
+ boost::bind(&LLTeleportHistoryPanel::gotSLURLCallback, _1));
+ }
+}
- if (has_collapsed_tabs && command_name == "expand_all")
- {
- return true;
- }
+bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
+{
+ std::string command_name = userdata.asString();
+
+ if (command_name == "collapse_all"
+ || command_name == "expand_all")
+ {
+ S32 tabs_cnt = mItemContainers.size();
+
+ bool has_expanded_tabs = false;
+ bool has_collapsed_tabs = false;
+
+ for (S32 n = 0; n < tabs_cnt; n++)
+ {
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
+ if (!tab->getVisible())
+ continue;
+
+ if (tab->getDisplayChildren())
+ {
+ has_expanded_tabs = true;
+ }
+ else
+ {
+ has_collapsed_tabs = true;
+ }
+
+ if (has_expanded_tabs && has_collapsed_tabs)
+ {
+ break;
+ }
+ }
+
+ if (command_name == "collapse_all")
+ {
+ return has_expanded_tabs;
+ }
+
+ if (command_name == "expand_all")
+ {
+ return has_collapsed_tabs;
+ }
+ }
+
+ if (command_name == "clear_history")
+ {
+ return mTeleportHistory->getItems().size() > 0;
+ }
+
+ if ("teleport" == command_name
+ || "view" == command_name
+ || "show_on_map" == command_name
+ || "copy_slurl" == command_name)
+ {
+ if (!mLastSelectedFlatlList)
+ {
+ return false;
+ }
+ LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
+ return itemp != NULL;
+ }
return false;
}
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index b88861c5c6..058fee0170 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -43,38 +43,26 @@ class LLMenuButton;
class LLTeleportHistoryPanel : public LLPanelPlacesTab
{
public:
- // *TODO: derive from LLListContextMenu?
- class ContextMenu
- {
- public:
- ContextMenu();
- void show(LLView* spawning_view, S32 index, S32 x, S32 y);
-
- private:
- LLContextMenu* createMenu();
- void onTeleport();
- void onInfo();
- void onCopyToClipboard();
-
- static void gotSLURLCallback(const std::string& slurl);
-
- LLContextMenu* mMenu;
- S32 mIndex;
- };
-
LLTeleportHistoryPanel();
virtual ~LLTeleportHistoryPanel();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void draw();
+ BOOL postBuild() override;
+ void draw() override;
- /*virtual*/ void onSearchEdit(const std::string& string);
- /*virtual*/ void onShowOnMap();
- /*virtual*/ void onShowProfile();
- /*virtual*/ void onTeleport();
- ///*virtual*/ void onCopySLURL();
- /*virtual*/ void updateVerbs();
- /*virtual*/ bool isSingleItemSelected();
+ void onSearchEdit(const std::string& string) override;
+ void onShowOnMap() override;
+ void onShowProfile() override;
+ void onTeleport() override;
+ ///*virtual*/ void onCopySLURL();
+ void onRemoveSelected() override;
+ void updateVerbs() override;
+ bool isSingleItemSelected() override;
+
+ LLToggleableMenu* getSelectionMenu() override;
+ LLToggleableMenu* getSortingMenu() override;
+ LLToggleableMenu* getCreateMenu() override;
+
+ bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override { return false; }
private:
@@ -88,13 +76,15 @@ private:
void onClearTeleportHistory();
bool onClearTeleportHistoryDialog(const LLSD& notification, const LLSD& response);
- void refresh();
+ void refresh() override;
void getNextTab(const LLDate& item_date, S32& curr_tab, LLDate& tab_date);
void onTeleportHistoryChange(S32 removed_index);
void replaceItem(S32 removed_index);
void showTeleportHistory();
void handleItemSelect(LLFlatListView* );
LLFlatListView* getFlatListViewFromTab(LLAccordionCtrlTab *);
+ static void gotSLURLCallback(const std::string& slurl);
+ void onGearMenuAction(const LLSD& userdata);
bool isActionEnabled(const LLSD& userdata) const;
void setAccordionCollapsedByUser(LLUICtrl* acc_tab, bool collapsed);
@@ -115,10 +105,10 @@ private:
typedef std::vector<LLAccordionCtrlTab*> item_containers_t;
item_containers_t mItemContainers;
- ContextMenu mContextMenu;
LLContextMenu* mAccordionTabMenu;
- LLHandle<LLView> mGearMenuHandle;
- LLMenuButton* mMenuGearButton;
+
+ LLToggleableMenu* mGearItemMenu;
+ LLToggleableMenu* mSortingMenu;
boost::signals2::connection mTeleportHistoryChangedConnection;
};
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 109013498e..0723a78704 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -31,6 +31,7 @@
#include "llagent.h"
#include "llagentui.h"
#include "llclipboard.h"
+#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "lllandmarkactions.h"
#include "lllocationinputctrl.h"
@@ -456,7 +457,7 @@ void LLPanelTopInfoBar::onContextMenuItemClicked(const LLSD::String& item)
if(landmark == NULL)
{
- LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
+ LLFloaterReg::showInstance("add_landmark");
}
else
{
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 48151c17ea..6dfe40c29a 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -164,8 +164,12 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
std::string type = key["type"].asString();
if (type == "my_outfits")
{
- showOutfitsInventoryPanel();
+ showOutfitsInventoryPanel("outfitslist_tab");
}
+ else if (type == "now_wearing")
+ {
+ showOutfitsInventoryPanel("cof_tab");
+ }
else if (type == "edit_outfit")
{
showOutfitEditPanel();
@@ -287,7 +291,14 @@ void LLSidepanelAppearance::showOutfitsInventoryPanel()
{
toggleWearableEditPanel(FALSE);
toggleOutfitEditPanel(FALSE);
- toggleMyOutfitsPanel(TRUE);
+ toggleMyOutfitsPanel(TRUE, "");
+}
+
+void LLSidepanelAppearance::showOutfitsInventoryPanel(const std::string &tab_name)
+{
+ toggleWearableEditPanel(FALSE);
+ toggleOutfitEditPanel(FALSE);
+ toggleMyOutfitsPanel(TRUE, tab_name);
}
void LLSidepanelAppearance::showOutfitEditPanel()
@@ -312,37 +323,42 @@ void LLSidepanelAppearance::showOutfitEditPanel()
return;
}
- toggleMyOutfitsPanel(FALSE);
+ toggleMyOutfitsPanel(FALSE, "");
toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode
toggleOutfitEditPanel(TRUE);
}
void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* = NULL*/, BOOL disable_camera_switch)
{
- toggleMyOutfitsPanel(FALSE);
+ toggleMyOutfitsPanel(FALSE, "");
toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode
toggleWearableEditPanel(TRUE, wearable, disable_camera_switch);
}
-void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible)
+void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name)
{
- if (!mPanelOutfitsInventory || mPanelOutfitsInventory->getVisible() == visible)
- {
- // visibility isn't changing, hence nothing to do
- return;
- }
-
- mPanelOutfitsInventory->setVisible(visible);
-
- // *TODO: Move these controls to panel_outfits_inventory.xml
- // so that we don't need to toggle them explicitly.
- mFilterEditor->setVisible(visible);
- mCurrOutfitPanel->setVisible(visible);
-
- if (visible)
- {
- mPanelOutfitsInventory->onOpen(LLSD());
- }
+ if (!mPanelOutfitsInventory
+ || (mPanelOutfitsInventory->getVisible() == visible && tab_name.empty()))
+ {
+ // visibility isn't changing, hence nothing to do
+ return;
+ }
+
+ mPanelOutfitsInventory->setVisible(visible);
+
+ // *TODO: Move these controls to panel_outfits_inventory.xml
+ // so that we don't need to toggle them explicitly.
+ mFilterEditor->setVisible(visible);
+ mCurrOutfitPanel->setVisible(visible);
+
+ if (visible)
+ {
+ mPanelOutfitsInventory->onOpen(LLSD());
+ if (!tab_name.empty())
+ {
+ mPanelOutfitsInventory->openApearanceTab(tab_name);
+ }
+ }
}
void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch)
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 7817fd317c..bb9709a2b8 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -56,7 +56,8 @@ public:
void fetchInventory();
void inventoryFetched();
- void showOutfitsInventoryPanel();
+ void showOutfitsInventoryPanel(); // last selected
+ void showOutfitsInventoryPanel(const std::string& tab_name);
void showOutfitEditPanel();
void showWearableEditPanel(LLViewerWearable *wearable = NULL, BOOL disable_camera_switch = FALSE);
void setWearablesLoading(bool val);
@@ -72,7 +73,7 @@ private:
void onOpenOutfitButtonClicked();
void onEditAppearanceButtonClicked();
- void toggleMyOutfitsPanel(BOOL visible);
+ void toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name);
void toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch = FALSE);
void toggleWearableEditPanel(BOOL visible, LLViewerWearable* wearable = NULL, BOOL disable_camera_switch = FALSE);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 2cb27d85bc..efa4a7fd66 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2253,52 +2253,91 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
}
}
-void renderNormals(LLDrawable* drawablep)
+void renderNormals(LLDrawable *drawablep)
{
- LLVertexBuffer::unbind();
+ if (!drawablep->isVisible())
+ return;
- LLVOVolume* vol = drawablep->getVOVolume();
- if (vol)
- {
- LLVolume* volume = vol->getVolume();
- gGL.pushMatrix();
- gGL.multMatrix((F32*) vol->getRelativeXform().mMatrix);
-
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ LLVertexBuffer::unbind();
- LLVector4a scale(gSavedSettings.getF32("RenderDebugNormalScale"));
+ LLVOVolume *vol = drawablep->getVOVolume();
- for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
- {
- const LLVolumeFace& face = volume->getVolumeFace(i);
+ if (vol)
+ {
+ LLVolume *volume = vol->getVolume();
- for (S32 j = 0; j < face.mNumVertices; ++j)
- {
- gGL.begin(LLRender::LINES);
- LLVector4a n,p;
-
- n.setMul(face.mNormals[j], scale);
- p.setAdd(face.mPositions[j], n);
-
- gGL.diffuseColor4f(1,1,1,1);
- gGL.vertex3fv(face.mPositions[j].getF32ptr());
- gGL.vertex3fv(p.getF32ptr());
-
- if (face.mTangents)
- {
- n.setMul(face.mTangents[j], scale);
- p.setAdd(face.mPositions[j], n);
-
- gGL.diffuseColor4f(0,1,1,1);
- gGL.vertex3fv(face.mPositions[j].getF32ptr());
- gGL.vertex3fv(p.getF32ptr());
- }
- gGL.end();
- }
- }
+ // Drawable's normals & tangents are stored in model space, i.e. before any scaling is applied.
+ //
+ // SL-13490, using pos + normal to compute the 2nd vertex of a normal line segment doesn't
+ // work when there's a non-uniform scale in the mix. Normals require MVP-inverse-transpose
+ // transform. We get that effect here by pre-applying the inverse scale (twice, because
+ // one forward scale will be re-applied via the MVP in the vertex shader)
- gGL.popMatrix();
- }
+ LLVector3 scale_v3 = vol->getScale();
+ float scale_len = scale_v3.length();
+ LLVector4a obj_scale(scale_v3.mV[VX], scale_v3.mV[VY], scale_v3.mV[VZ]);
+ obj_scale.normalize3();
+
+ // Normals &tangent line segments get scaled along with the object. Divide by scale length
+ // to keep the as-viewed lengths (relatively) constant with the debug setting length
+ float draw_length = gSavedSettings.getF32("RenderDebugNormalScale") / scale_len;
+
+ // Create inverse-scale vector for normals
+ LLVector4a inv_scale(1.0 / scale_v3.mV[VX], 1.0 / scale_v3.mV[VY], 1.0 / scale_v3.mV[VZ]);
+ inv_scale.mul(inv_scale); // Squared, to apply inverse scale twice
+ inv_scale.normalize3fast();
+
+ gGL.pushMatrix();
+ gGL.multMatrix((F32 *) vol->getRelativeXform().mMatrix);
+
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
+ {
+ const LLVolumeFace &face = volume->getVolumeFace(i);
+
+ gGL.flush();
+ gGL.diffuseColor4f(1, 1, 0, 1);
+ gGL.begin(LLRender::LINES);
+ for (S32 j = 0; j < face.mNumVertices; ++j)
+ {
+ LLVector4a n, p;
+
+ n.setMul(face.mNormals[j], 1.0);
+ n.mul(inv_scale); // Pre-scale normal, so it's left with an inverse-transpose xform after MVP
+ n.normalize3fast();
+ n.mul(draw_length);
+ p.setAdd(face.mPositions[j], n);
+
+ gGL.vertex3fv(face.mPositions[j].getF32ptr());
+ gGL.vertex3fv(p.getF32ptr());
+ }
+ gGL.end();
+
+ // Tangents are simple vectors and do not require reorientation via pre-scaling
+ if (face.mTangents)
+ {
+ gGL.flush();
+ gGL.diffuseColor4f(0, 1, 1, 1);
+ gGL.begin(LLRender::LINES);
+ for (S32 j = 0; j < face.mNumVertices; ++j)
+ {
+ LLVector4a t, p;
+
+ t.setMul(face.mTangents[j], 1.0f);
+ t.normalize3fast();
+ t.mul(draw_length);
+ p.setAdd(face.mPositions[j], t);
+
+ gGL.vertex3fv(face.mPositions[j].getF32ptr());
+ gGL.vertex3fv(p.getF32ptr());
+ }
+ gGL.end();
+ }
+ }
+
+ gGL.popMatrix();
+ }
}
S32 get_physics_detail(const LLVolumeParams& volume_params, const LLVector3& scale)
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index af0421b4c5..c5d5be3509 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -128,10 +128,12 @@
#include "llpanelpick.h"
#include "llpanelgrouplandmoney.h"
#include "llpanelgroupnotices.h"
+#include "llparcel.h"
#include "llpreview.h"
#include "llpreviewscript.h"
#include "llproxy.h"
#include "llproductinforequest.h"
+#include "llqueryflags.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "llstatview.h"
@@ -142,6 +144,7 @@
#include "lltoolmgr.h"
#include "lltrans.h"
#include "llui.h"
+#include "lluiusage.h"
#include "llurldispatcher.h"
#include "llurlentry.h"
#include "llslurl.h"
@@ -176,6 +179,7 @@
#include "pipeline.h"
#include "llappviewer.h"
#include "llfasttimerview.h"
+#include "lltelemetry.h"
#include "llfloatermap.h"
#include "llweb.h"
#include "llvoiceclient.h"
@@ -228,7 +232,6 @@ extern S32 gStartImageHeight;
static bool gGotUseCircuitCodeAck = false;
static std::string sInitialOutfit;
static std::string sInitialOutfitGender; // "male" or "female"
-static boost::signals2::connection sWearablesLoadedCon;
static bool gUseCircuitCallbackCalled = false;
@@ -527,6 +530,8 @@ bool idle_startup()
}
#if LL_WINDOWS
+ LLPROFILE_STARTUP();
+
// On the windows dev builds, unpackaged, the message.xml file will
// be located in indra/build-vc**/newview/<config>/app_settings.
std::string message_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"message.xml");
@@ -1667,8 +1672,20 @@ bool idle_startup()
if (STATE_INVENTORY_SEND == LLStartUp::getStartupState())
{
display_startup();
+
+ // request mute list
+ LL_INFOS() << "Requesting Mute List" << LL_ENDL;
+ LLMuteList::getInstance()->requestFromServer(gAgent.getID());
+
+ // Get L$ and ownership credit information
+ LL_INFOS() << "Requesting Money Balance" << LL_ENDL;
+ LLStatusBar::sendMoneyBalanceRequest();
+
+ display_startup();
+
// Inform simulator of our language preference
LLAgentLanguage::update();
+
display_startup();
// unpack thin inventory
LLSD response = LLLoginInstance::getInstance()->getResponse();
@@ -1835,14 +1852,6 @@ bool idle_startup()
LLLandmark::registerCallbacks(msg);
display_startup();
- // request mute list
- LL_INFOS() << "Requesting Mute List" << LL_ENDL;
- LLMuteList::getInstance()->requestFromServer(gAgent.getID());
- display_startup();
- // Get L$ and ownership credit information
- LL_INFOS() << "Requesting Money Balance" << LL_ENDL;
- LLStatusBar::sendMoneyBalanceRequest();
- display_startup();
// request all group information
LL_INFOS() << "Requesting Agent Data" << LL_ENDL;
gAgent.sendAgentDataUpdateRequest();
@@ -1899,10 +1908,6 @@ bool idle_startup()
// Set the show start location to true, now that the user has logged
// on with this install.
gSavedSettings.setBOOL("ShowStartLocation", TRUE);
-
- // Open Conversation floater on first login.
- LLFloaterReg::toggleInstanceOrBringToFront("im_container");
-
}
display_startup();
@@ -2260,6 +2265,16 @@ bool idle_startup()
gAgentAvatarp->sendHoverHeight();
+ // look for parcels we own
+ send_places_query(LLUUID::null,
+ LLUUID::null,
+ "",
+ DFQ_AGENT_OWNED,
+ LLParcel::C_ANY,
+ "");
+
+ LLUIUsage::instance().clear();
+
return TRUE;
}
@@ -2695,11 +2710,6 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
}
else
{
- // FIXME SH-3860 - this creates a race condition, where COF
- // changes (base outfit link added) after appearance update
- // request has been submitted.
- sWearablesLoadedCon = gAgentWearables.addLoadedCallback(LLStartUp::saveInitialOutfit);
-
bool do_copy = true;
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
@@ -2713,23 +2723,6 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
gAgentWearables.sendDummyAgentWearablesUpdate();
}
-//static
-void LLStartUp::saveInitialOutfit()
-{
- if (sInitialOutfit.empty()) {
- LL_DEBUGS() << "sInitialOutfit is empty" << LL_ENDL;
- return;
- }
-
- if (sWearablesLoadedCon.connected())
- {
- LL_DEBUGS("Avatar") << "sWearablesLoadedCon is connected, disconnecting" << LL_ENDL;
- sWearablesLoadedCon.disconnect();
- }
- LL_DEBUGS("Avatar") << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << LL_ENDL;
- LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);
-}
-
std::string& LLStartUp::getInitialOutfitName()
{
return sInitialOutfit;
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 3ec3ff4133..116aeb36a7 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -110,9 +110,6 @@ public:
static void loadInitialOutfit( const std::string& outfit_folder_name,
const std::string& gender_name );
- //save loaded initial outfit into My Outfits category
- static void saveInitialOutfit();
-
static std::string& getInitialOutfitName();
static std::string getUserId();
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 4d55448d78..0a87b14e17 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -416,7 +416,20 @@ void LLStatusBar::sendMoneyBalanceRequest()
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MoneyData);
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null );
- gAgent.sendReliableMessage();
+
+ if (gDisconnected)
+ {
+ LL_DEBUGS() << "Trying to send message when disconnected, skipping balance request!" << LL_ENDL;
+ return;
+ }
+ if (!gAgent.getRegion())
+ {
+ LL_DEBUGS() << "LLAgent::sendReliableMessage No region for agent yet, skipping balance request!" << LL_ENDL;
+ return;
+ }
+ // Double amount of retries due to this request initially happening during busy stage
+ // Ideally this should be turned into a capability
+ gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);
}
diff --git a/indra/newview/lltelemetry.cpp b/indra/newview/lltelemetry.cpp
new file mode 100644
index 0000000000..0c63e2fede
--- /dev/null
+++ b/indra/newview/lltelemetry.cpp
@@ -0,0 +1,145 @@
+ /**
+ * @file lltelemetry.cpp
+ * @brief Wrapper for Rad Game Tools Telemetry
+ *
+ * $LicenseInfo:firstyear=2020&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2020, 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 "lltelemetry.h"
+
+#if LLPROFILE_USE_RAD_TELEMETRY_PROFILER
+ #if LL_WINDOWS
+ #include "llwin32headers.h"
+
+ // build-vc120-64\packages\lib\release
+ // build-vc150-64\packages\lib\release
+ #ifdef _MSC_VER
+ #pragma comment(lib,"rad_tm_win64.lib")
+ #else
+ #pragma message "NOTE: Rad GameTools Telemetry requested but non-MSVC compiler not yet supported on Windows"
+ #endif
+ #endif // LL_WINDOWS
+
+ #if LL_DARWIN
+ #pragma message "NOTE: Rad Game Tools Telemetry requested but not yet supported on Darwin"
+ #endif
+
+ #if LL_LINUX
+ #pragma message "NOTE: Rad Game Tools Telemetry requested but not yet supported on Linux"
+ #endif
+
+//
+// local consts
+//
+static const tm_int32 TELEMETRY_BUFFER_SIZE = 8 * 1024 * 1024;
+
+//
+// local globals
+//
+static char *gTelemetryBufferPtr = NULL; // Telemetry
+
+static const char *tm_status[ TMERR_INIT_NETWORKING_FAILED + 1 ] =
+{
+ "Telemetry pass: connected" // TM_OK
+ , "Telemetry FAIL: disabled via #define NTELEMETRY" // TMERR_DISABLED
+ , "Telemetry FAIL: invalid paramater" // TMERR_INVALID_PARAM
+ , "Telemetry FAIL: DLL not found" // TMERR_NULL_API
+ , "Telemetry FAIL: out of resources" // TMERR_OUT_OF_RESOURCES
+ , "Telemetry FAIL: tmInitialize() not called" // TMERR_UNINITIALIZED
+ , "Telemetry FAIL: bad hostname" // TMERR_BAD_HOSTNAME
+ , "Telemetry FAIL: couldn't connect to server" // TMERR_COULD_NOT_CONNECT
+ , "Telemetry FAIL: unknown network error" // TMERR_UNKNOWN_NETWORK
+ , "Telemetry FAIL: tmShutdown() already called" // TMERR_ALREADY_SHUTDOWN
+ , "Telemetry FAIL: memory buffer too small" // TMERR_ARENA_TOO_SMALL
+ , "Telemetry FAIL: server handshake error" // TMERR_BAD_HANDSHAKE
+ , "Telemetry FAIL: unaligned parameters" // TMERR_UNALIGNED
+ , "Telemetry FAIL: network not initialized" // TMERR_NETWORK_NOT_INITIALIZED -- WSAStartup not called before tmOpen()
+ , "Telemetry FAIL: bad version" // TMERR_BAD_VERSION
+ , "Telemetry FAIL: timer too large" // TMERR_BAD_TIMER
+ , "Telemetry FAIL: tmOpen() already called" // TMERR_ALREADY_OPENED
+ , "Telemetry FAIL: tmInitialize() already called" // TMERR_ALREADY_INITIALIZED
+ , "Telemetry FAIL: could't open file" // TMERR_FILE_OPEN_FAILED
+ , "Telemetry FAIL: tmOpen() failed networking" // TMERR_INIT_NETWORKING_FAILED
+};
+
+//
+// exported functionality
+//
+
+void telemetry_shutdown()
+{
+ #if LL_WINDOWS
+ if (gTelemetryBufferPtr)
+ {
+ tmClose(0);
+ tmShutdown();
+
+ delete[] gTelemetryBufferPtr;
+ gTelemetryBufferPtr = NULL;
+ }
+ #endif
+}
+
+void telemetry_startup()
+{
+ #if LL_WINDOWS
+ tmLoadLibrary(TM_RELEASE); // Loads .dll
+
+ gTelemetryBufferPtr = new char[ TELEMETRY_BUFFER_SIZE ];
+ tmInitialize(TELEMETRY_BUFFER_SIZE, gTelemetryBufferPtr);
+
+ tm_error telemetry_status = tmOpen(
+ 0, // unused
+ "SecondLife", // app name
+ __DATE__ " " __TIME__, // build identifier
+ "localhost", // server name (or filename)
+ TMCT_TCP, // connection type (or TMCT_FILE)
+ 4719, // port
+ TMOF_INIT_NETWORKING, // open flags
+ 250 ); // timeout ms
+
+ if (telemetry_status == TMERR_UNKNOWN)
+ {
+ LL_ERRS() << "Telemetry FAIL: unknown error" << LL_ENDL;
+ }
+ else if (telemetry_status && (telemetry_status <= TMERR_INIT_NETWORKING_FAILED))
+ {
+ LL_INFOS() << tm_status[ telemetry_status ] << LL_ENDL;
+ free(gTelemetryBufferPtr);
+ gTelemetryBufferPtr = NULL;
+ }
+ #endif // LL_WINDOWS
+}
+
+// Called after we render a frame
+void telemetry_update()
+{
+ #if LL_WINDOWS
+ if (gTelemetryBufferPtr)
+ {
+ tmTick(0);
+ }
+ #endif
+}
+#endif // LLPROFILE_USE_RAD_TELEMETRY_PROFILER
diff --git a/indra/newview/lltelemetry.h b/indra/newview/lltelemetry.h
new file mode 100644
index 0000000000..a73e5fcfa2
--- /dev/null
+++ b/indra/newview/lltelemetry.h
@@ -0,0 +1,81 @@
+/**
+ * @file lltelemetry.h
+ * @brief Wrapper for Rad Game Tools Telemetry
+ *
+ * $LicenseInfo:firstyear=2020&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2020, 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$
+ */
+
+/*
+To use:
+
+1. Uncomment #define LLPROFILE_USE_RAD_TELEMETRY_PROFILER below
+
+2. Include this header file
+ #include "lltelemetry.h"
+
+3. Add zones to the functions you wish to profile
+ void onFoo()
+ {
+ LLPROFILE_ZONE("Foo");
+ }
+*/
+//#define LLPROFILE_USE_RAD_TELEMETRY_PROFILER 1
+
+// Default NO local telemetry profiling
+#ifndef LLPROFILE_USE_RAD_TELEMETRY_PROFILER
+ #define LLPROFILE_USE_RAD_TELEMETRY_PROFILER 0
+ #define LLPROFILE_SHUTDOWN( ...) {}
+ #define LLPROFILE_STARTUP( ...) {}
+ #define LLPROFILE_UPDATE( ...) {}
+
+ #define LLPROFILE_AUTO_CPU_MARKER_COLOR(r, g, b)
+ #define LLPROFILE_ENTER(name)
+ #define LLPROFILE_ENTER_FORMAT(format, ...)
+ #define LLPROFILE_FUNCTION
+ #define LLPROFILE_LEAVE()
+ #define LLPROFILE_THREAD_NAME(name)
+ #define LLPROFILE_ZONE(name)
+ #define LLPROFILE_ZONE_FORMAT(format, ...)
+#else
+ #include <rad_tm.h>
+
+ #define LLPROFILE_SHUTDOWN telemetry_shutdown
+ #define LLPROFILE_STARTUP telemetry_startup
+ #define LLPROFILE_UPDATE telemetry_update
+
+ #define LLPROFILE_AUTO_CPU_MARKER_COLOR(r, g, b) tmZoneColor(r, g, b)
+ #define LLPROFILE_ENTER(name) tmEnter(0, 0, name)
+ #define LLPROFILE_ENTER_FORMAT(format, ...) tmEnter(0, 0, format, __VA_ARGS__)
+ #define LLPROFILE_FUNCTION tmFunction(0, 0)
+ #define LLPROFILE_LEAVE() tmLeave(0)
+ #define LLPROFILE_THREAD_NAME(name) tmThreadName(0, 0, name)
+ #define LLPROFILE_ZONE(name) tmZone(0, 0, name)
+ #define LLPROFILE_ZONE_FORMAT(format, ...) tmZone(0, 0, format, __VA_ARGS__)
+#endif // LLPROFILE_USE_RAD_TELEMETRY_PROFILER
+
+//
+// exported functionality
+//
+
+extern void telemetry_startup();
+extern void telemetry_shutdown();
+extern void telemetry_update(); // called after every frame update
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index 8a5704939a..93fa457bd0 100644
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -33,6 +33,8 @@
#include "lldir.h"
#include "llteleporthistory.h"
#include "llagent.h"
+#include "llfloaterreg.h"
+#include "llfloaterworldmap.h"
// Max offset for two global positions to consider them as equal
const F64 MAX_GLOBAL_POS_OFFSET = 5.0f;
@@ -253,3 +255,23 @@ void LLTeleportHistoryStorage::goToItem(S32 idx)
gAgent.teleportViaLocation(mItems[idx].mGlobalPos);
}
+void LLTeleportHistoryStorage::showItemOnMap(S32 idx)
+{
+ // Validate specified index.
+ if (idx < 0 || idx >= (S32)mItems.size())
+ {
+ LL_WARNS() << "Invalid teleport history index (" << idx << ") specified" << LL_ENDL;
+ dump();
+ return;
+ }
+
+ LLVector3d landmark_global_pos = mItems[idx].mGlobalPos;
+
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ if (!landmark_global_pos.isExactlyZero() && worldmap_instance)
+ {
+ worldmap_instance->trackLocation(landmark_global_pos);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
+}
+
diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h
index 946ac0af1a..3578923fd7 100644
--- a/indra/newview/llteleporthistorystorage.h
+++ b/indra/newview/llteleporthistorystorage.h
@@ -107,6 +107,13 @@ public:
*/
void goToItem(S32 idx);
+ /**
+ * Show specific item on map.
+ *
+ * The item is specified by its index (starting from 0).
+ */
+ void showItemOnMap(S32 idx);
+
private:
void load();
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 6a29be4aa1..8baad30e8f 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -121,6 +121,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
data.mURLExternal = mNotification->getURLOpenExternally();
}
+ if((*it).has("width"))
+ {
+ data.mWidth = (*it)["width"].asInteger();
+ }
+
mButtonData.push_back(data);
option_index++;
}
@@ -159,15 +164,29 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
// Calc total width of buttons
S32 button_width = 0;
S32 sp = font->getWidth(std::string("OO"));
+ S32 btn_total_width = 0;
+ S32 default_size_btns = 0;
for( S32 i = 0; i < num_options; i++ )
- {
+ {
S32 w = S32(font->getWidth( options[i].second ) + 0.99f) + sp + 2 * LLBUTTON_H_PAD;
- button_width = llmax( w, button_width );
+ if (mButtonData[i].mWidth > w)
+ {
+ btn_total_width += mButtonData[i].mWidth;
+ }
+ else
+ {
+ button_width = llmax(w, button_width);
+ default_size_btns++;
+ }
}
- S32 btn_total_width = button_width;
+
if( num_options > 1 )
{
- btn_total_width = (num_options * button_width) + ((num_options - 1) * BTN_HPAD);
+ btn_total_width = btn_total_width + (button_width * default_size_btns) + ((num_options - 1) * BTN_HPAD);
+ }
+ else
+ {
+ btn_total_width = llmax(btn_total_width, button_width);
}
// Message: create text box using raw string, as text has been structure deliberately
@@ -272,7 +291,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLineEditor->setText(edit_text_contents);
std::string notif_name = mNotification->getName();
- if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name))
+ if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name) || ("CreateLandmarkFolder" == notif_name))
{
mLineEditor->setPrevalidate(&LLTextValidate::validateASCII);
}
@@ -333,7 +352,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
if(btn)
{
btn->setName(options[i].first);
- btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT ));
+ btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, (mButtonData[i].mWidth == 0) ? button_width : mButtonData[i].mWidth, BTN_HEIGHT ));
btn->setLabel(options[i].second);
btn->setFont(font);
@@ -348,7 +367,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
btn->setFocus(TRUE);
}
}
- button_left += button_width + BTN_HPAD;
+ button_left += ((mButtonData[i].mWidth == 0) ? button_width : mButtonData[i].mWidth) + BTN_HPAD;
}
setCheckBoxes(HPAD, VPAD);
diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h
index 9b4e054bf1..bd34e40642 100644
--- a/indra/newview/lltoastalertpanel.h
+++ b/indra/newview/lltoastalertpanel.h
@@ -82,9 +82,14 @@ private:
struct ButtonData
{
+ ButtonData()
+ : mWidth(0)
+ {}
+
LLButton* mButton;
std::string mURL;
U32 mURLExternal;
+ S32 mWidth;
};
std::vector<ButtonData> mButtonData;
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index bccf88128d..024f25bc98 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -387,9 +387,9 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
if (mIsScriptDialog)
{
// we are using default width for script buttons so we can determinate button_rows
- //to get a number of rows we divide the required width of the buttons to button_panel_width
- S32 button_rows = llceil(F32(buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width);
- //S32 button_rows = (buttons.size() - 1) * (BUTTON_WIDTH + h_pad) / button_panel_width;
+ // to get a number of rows we divide the required width of the buttons to button_panel_width
+ // buttons.size() is reduced by -2 due to presence of ignore button which is calculated independently a bit lower
+ S32 button_rows = llceil(F32(buttons.size() - 2) * (BUTTON_WIDTH + h_pad) / (button_panel_width + h_pad));
//reserve one row for the ignore_btn
button_rows++;
//calculate required panel height for scripdialog notification.
diff --git a/indra/newview/llurlfloaterdispatchhandler.cpp b/indra/newview/llurlfloaterdispatchhandler.cpp
new file mode 100644
index 0000000000..6b1a373beb
--- /dev/null
+++ b/indra/newview/llurlfloaterdispatchhandler.cpp
@@ -0,0 +1,214 @@
+/**
+ * @file llurlfloaterdispatchhandler.cpp
+ * @brief Handles URLFloater generic message from server
+ *
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2021, 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 "llurlfloaterdispatchhandler.h"
+
+#include "llfloaterreg.h"
+#include "llfloaterhowto.h"
+#include "llfloaterwebcontent.h"
+#include "llsdserialize.h"
+#include "llviewercontrol.h"
+#include "llviewergenericmessage.h"
+#include "llweb.h"
+
+// Example:
+// llOpenFloater("guidebook", "http://page.com", []);
+
+// values specified by server side's dispatcher
+// for llopenfloater
+const std::string MESSAGE_URL_FLOATER("URLFloater");
+const std::string KEY_ACTION("action"); // "action" will be the string constant "OpenURL"
+const std::string VALUE_OPEN_URL("OpenURL");
+const std::string KEY_DATA("action_data");
+const std::string KEY_FLOATER("floater_title"); // name of the floater, not title
+const std::string KEY_URL("floater_url");
+const std::string KEY_PARAMS("floater_params");
+
+// Supported floaters
+const std::string FLOATER_GUIDEBOOK("guidebook");
+const std::string FLOATER_HOW_TO("how_to"); // alias for guidebook
+const std::string FLOATER_WEB_CONTENT("web_content");
+
+// All arguments are palceholders! Server side will need to add validation first.
+// Web content universal argument
+const std::string KEY_TRUSTED_CONTENT("trusted_content");
+
+// Guidebook specific arguments
+const std::string KEY_WIDTH("width");
+const std::string KEY_HEGHT("height");
+const std::string KEY_CAN_CLOSE("can_close");
+const std::string KEY_TITLE("title");
+
+// web_content specific arguments
+const std::string KEY_SHOW_PAGE_TITLE("show_page_title");
+const std::string KEY_ALLOW_ADRESS_ENTRY("allow_address_entry"); // It is not recomended to set this to true if trusted content is allowed
+
+
+LLUrlFloaterDispatchHandler LLUrlFloaterDispatchHandler::sUrlDispatchhandler;
+
+LLUrlFloaterDispatchHandler::LLUrlFloaterDispatchHandler()
+{
+}
+
+LLUrlFloaterDispatchHandler::~LLUrlFloaterDispatchHandler()
+{
+}
+
+void LLUrlFloaterDispatchHandler::registerInDispatcher()
+{
+ if (!gGenericDispatcher.isHandlerPresent(MESSAGE_URL_FLOATER))
+ {
+ gGenericDispatcher.addHandler(MESSAGE_URL_FLOATER, &sUrlDispatchhandler);
+ }
+}
+
+//virtual
+bool LLUrlFloaterDispatchHandler::operator()(const LLDispatcher *, const std::string& key, const LLUUID& invoice, const sparam_t& strings)
+{
+ // invoice - transaction id
+
+ LLSD message;
+ sparam_t::const_iterator it = strings.begin();
+
+ if (it != strings.end())
+ {
+ const std::string& llsdRaw = *it++;
+ std::istringstream llsdData(llsdRaw);
+ if (!LLSDSerialize::deserialize(message, llsdData, llsdRaw.length()))
+ {
+ LL_WARNS("URLFloater") << "Attempted to read parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
+ return false;
+ }
+ }
+
+ // At the moment command_params is a placeholder and code treats it as map
+ // Once server side adds argument validation this will be either a map or an array
+ std::string floater;
+ LLSD command_params;
+ std::string url;
+
+ if (message.has(KEY_ACTION) && message[KEY_ACTION].asString() == VALUE_OPEN_URL)
+ {
+ LLSD &action_data = message[KEY_DATA];
+ if (action_data.isMap())
+ {
+ floater = action_data[KEY_FLOATER].asString();
+ command_params = action_data[KEY_PARAMS];
+ url = action_data[KEY_URL].asString();
+ }
+ }
+ else if (message.has(KEY_FLOATER))
+ {
+ floater = message[KEY_FLOATER].asString();
+ command_params = message[KEY_PARAMS];
+ url = message[KEY_URL].asString();
+ }
+ else
+ {
+ LL_WARNS("URLFloater") << "Received " << MESSAGE_URL_FLOATER << " with unexpected data format: " << message << LL_ENDL;
+ return false;
+ }
+
+ if (url.find("://") == std::string::npos)
+ {
+ // try unescaping
+ url = LLURI::unescape(url);
+ }
+
+ LLFloaterWebContent::Params params;
+ params.url = url;
+
+ if (floater == FLOATER_GUIDEBOOK || floater == FLOATER_HOW_TO)
+ {
+ LL_DEBUGS("URLFloater") << "Opening how_to floater with parameters: " << message << LL_ENDL;
+ if (command_params.isMap()) // by default is undefines
+ {
+ params.trusted_content = command_params.has(KEY_TRUSTED_CONTENT) ? command_params[KEY_TRUSTED_CONTENT].asBoolean() : false;
+
+ // Script's side argument list can't include other lists, neither
+ // there is a LLRect type, so expect just width and height
+ if (command_params.has(KEY_WIDTH) && command_params.has(KEY_HEGHT))
+ {
+ LLRect rect(0, command_params[KEY_HEGHT].asInteger(), command_params[KEY_WIDTH].asInteger(), 0);
+ params.preferred_media_size.setValue(rect);
+ }
+ }
+
+ // Some locations will have customized guidebook, which this function easists for
+ // only one instance of guidebook can exist at a time, so if this command arrives,
+ // we need to close previous guidebook then reopen it.
+
+ LLFloater* instance = LLFloaterReg::findInstance("guidebook");
+ if (instance)
+ {
+ instance->closeHostedFloater();
+ }
+
+ LLFloaterReg::toggleInstanceOrBringToFront("guidebook", params);
+
+ if (command_params.isMap())
+ {
+ LLFloater* instance = LLFloaterReg::findInstance("guidebook");
+ if (command_params.has(KEY_CAN_CLOSE))
+ {
+ instance->setCanClose(command_params[KEY_CAN_CLOSE].asBoolean());
+ }
+ if (command_params.has(KEY_TITLE))
+ {
+ instance->setTitle(command_params[KEY_TITLE].asString());
+ }
+ }
+ }
+ else if (floater == FLOATER_WEB_CONTENT)
+ {
+ LL_DEBUGS("URLFloater") << "Opening web_content floater with parameters: " << message << LL_ENDL;
+ if (command_params.isMap()) // by default is undefines, might be better idea to init params from command_params
+ {
+ params.trusted_content = command_params.has(KEY_TRUSTED_CONTENT) ? command_params[KEY_TRUSTED_CONTENT].asBoolean() : false;
+ params.show_page_title = command_params.has(KEY_SHOW_PAGE_TITLE) ? command_params[KEY_SHOW_PAGE_TITLE].asBoolean() : true;
+ params.allow_address_entry = command_params.has(KEY_ALLOW_ADRESS_ENTRY) ? command_params[KEY_ALLOW_ADRESS_ENTRY].asBoolean() : true;
+ }
+ LLFloaterReg::showInstance("web_content", params);
+ }
+ else
+ {
+ LL_DEBUGS("URLFloater") << "Unknow floater with parameters: " << message << LL_ENDL;
+ if (LLFloaterReg::isRegistered(floater))
+ {
+ // A valid floater
+ LL_INFOS("URLFloater") << "Floater " << floater << " is not supported by llopenfloater or URLFloater" << LL_ENDL;
+ }
+ else
+ {
+ // A valid message, but no such flaoter
+ LL_WARNS("URLFloater") << "Recieved a command to open unknown floater: " << floater << LL_ENDL;
+ }
+ }
+
+ return true;
+}
diff --git a/indra/newview/llurlfloaterdispatchhandler.h b/indra/newview/llurlfloaterdispatchhandler.h
new file mode 100644
index 0000000000..1dff52c66f
--- /dev/null
+++ b/indra/newview/llurlfloaterdispatchhandler.h
@@ -0,0 +1,49 @@
+/**
+ * @file llurlfloaterdispatchhandler.h
+ * @brief Handles URLFloater generic message from server
+ *
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2021, 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_LLURLFLOATERDISPATCHHANDLER_H
+#define LL_LLURLFLOATERDISPATCHHANDLER_H
+
+#include "lldispatcher.h"
+
+class LLUrlFloaterDispatchHandler : public LLDispatchHandler
+{
+public:
+ LOG_CLASS(LLUrlFloaterDispatchHandler);
+
+ LLUrlFloaterDispatchHandler();
+ virtual ~LLUrlFloaterDispatchHandler();
+
+ virtual bool operator()(const LLDispatcher *, const std::string& key, const LLUUID& invoice, const sparam_t& strings) override;
+
+ static void registerInDispatcher();
+
+private:
+ static LLUrlFloaterDispatchHandler sUrlDispatchhandler;
+};
+
+#endif // LL_LLURLFLOATERDISPATCHHANDLER_H
+
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index d314b1477a..066c874eb8 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -474,6 +474,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gAgent.setTeleportState( LLAgent::TELEPORT_ARRIVING );
gAgent.setTeleportMessage(
LLAgent::sTeleportProgressMessages["arriving"]);
+ gAgent.sheduleTeleportIM();
gTextureList.mForceResetTextureStats = TRUE;
gAgentCamera.resetView(TRUE, TRUE);
@@ -753,10 +754,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
glViewport(0,0,512,512);
LLVOAvatar::updateFreezeCounter() ;
- if(!LLPipeline::sMemAllocationThrottled)
- {
- LLVOAvatar::updateImpostors();
- }
+ LLVOAvatar::updateImpostors();
set_current_projection(proj);
set_current_modelview(mod);
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 414ae1fad6..5a05f89758 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -34,6 +34,7 @@
#include "llcompilequeue.h"
#include "llfasttimerview.h"
#include "llfloaterabout.h"
+#include "llfloateraddpaymentmethod.h"
#include "llfloaterauction.h"
#include "llfloaterautoreplacesettings.h"
#include "llfloateravatar.h"
@@ -57,6 +58,7 @@
#include "llfloaterchatvoicevolume.h"
#include "llfloaterconversationlog.h"
#include "llfloaterconversationpreview.h"
+#include "llfloatercreatelandmark.h"
#include "llfloaterdeleteprefpreset.h"
#include "llfloaterdestinations.h"
#include "llfloatereditextdaycycle.h"
@@ -74,6 +76,7 @@
#include "llfloatergroups.h"
#include "llfloaterhelpbrowser.h"
#include "llfloaterhoverheight.h"
+#include "llfloaterhowto.h"
#include "llfloaterhud.h"
#include "llfloaterimagepreview.h"
#include "llfloaterimsession.h"
@@ -194,6 +197,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterAboutUtil::registerFloater();
LLFloaterReg::add("block_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFastTimerView>);
LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
+ LLFloaterReg::add("add_payment_method", "floater_add_payment_method.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAddPaymentMethod>);
LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("associate_listing", "floater_associate_listing.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAssociateListing>);
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
@@ -220,6 +224,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("nearby_chat", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterIMNearbyChat::buildFloater);
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
LLFloaterReg::add("conversation", "floater_conversation_log.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterConversationLog>);
+ LLFloaterReg::add("add_landmark", "floater_create_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCreateLandmark>);
LLFloaterReg::add("delete_pref_preset", "floater_delete_pref_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDeletePrefPreset>);
LLFloaterReg::add("destinations", "floater_destinations.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDestinations>);
@@ -358,7 +363,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
- LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
+ LLFloaterReg::add("guidebook", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>);
LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBigPreview>);
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index a448a95904..9653e80b53 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -143,8 +143,10 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
//----------------------------------------------------------------
for (LLJoint* j : mChildren)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(j);
- F32 jointLOD = joint ? joint->getLOD() : 0;
+ // LLViewerJoint is derived from LLAvatarJoint,
+ // all children of LLAvatarJoint are assumed to be LLAvatarJoint
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(j);
+ F32 jointLOD = joint->getLOD();
if (pixelArea >= jointLOD || sDisableLOD)
{
triangle_count += joint->render( pixelArea, TRUE, is_dummy );
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index fdfd22c117..63ad708e59 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -56,7 +56,7 @@
#include "m4math.h"
#include "llmatrix4a.h"
-#if !LL_DARWIN && !LL_LINUX && !LL_SOLARIS
+#if !LL_DARWIN && !LL_LINUX
extern PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB;
extern PFNGLWEIGHTFVARBPROC glWeightfvARB;
extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 9d05f59b09..fbf057603e 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -64,6 +64,7 @@
#include "llfloaterimcontainer.h"
#include "llfloaterland.h"
#include "llfloaterimnearbychat.h"
+#include "llfloaterlandholdings.h"
#include "llfloaterpathfindingcharacters.h"
#include "llfloaterpathfindinglinksets.h"
#include "llfloaterpay.h"
@@ -185,11 +186,15 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"
LLMenuGL* gAttachSubMenu = NULL;
LLMenuGL* gDetachSubMenu = NULL;
LLMenuGL* gTakeOffClothes = NULL;
+LLMenuGL* gDetachAvatarMenu = NULL;
+LLMenuGL* gDetachHUDAvatarMenu = NULL;
LLContextMenu* gAttachScreenPieMenu = NULL;
LLContextMenu* gAttachPieMenu = NULL;
LLContextMenu* gAttachBodyPartPieMenus[9];
LLContextMenu* gDetachPieMenu = NULL;
LLContextMenu* gDetachScreenPieMenu = NULL;
+LLContextMenu* gDetachAttSelfMenu = NULL;
+LLContextMenu* gDetachHUDAttSelfMenu = NULL;
LLContextMenu* gDetachBodyPartPieMenus[9];
//
@@ -444,6 +449,9 @@ void init_menus()
gMenuAttachmentOther = LLUICtrlFactory::createFromFile<LLContextMenu>(
"menu_attachment_other.xml", gMenuHolder, registry);
+ gDetachHUDAttSelfMenu = gMenuHolder->getChild<LLContextMenu>("Detach Self HUD", true);
+ gDetachAttSelfMenu = gMenuHolder->getChild<LLContextMenu>("Detach Self", true);
+
gMenuLand = LLUICtrlFactory::createFromFile<LLContextMenu>(
"menu_land.xml", gMenuHolder, registry);
@@ -500,6 +508,9 @@ void init_menus()
gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE);
gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE);
+ gDetachAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach", true);
+ gDetachHUDAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach HUD", true);
+
// Don't display the Memory console menu if the feature is turned off
LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", TRUE);
if (memoryMenu)
@@ -676,19 +687,6 @@ class LLAdvancedCheckHUDInfo : public view_listener_t
};
-//////////////
-// FLYING //
-//////////////
-
-class LLAdvancedAgentFlyingInfo : public view_listener_t
-{
- bool handleEvent(const LLSD&)
- {
- return gAgent.getFlying();
- }
-};
-
-
///////////////////////
// CLEAR GROUP CACHE //
///////////////////////
@@ -3743,6 +3741,35 @@ bool enable_sitdown_self()
return show_sitdown_self() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying();
}
+class LLSelfToggleSitStand : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ if (isAgentAvatarValid())
+ {
+ if (gAgentAvatarp->isSitting())
+ {
+ gAgent.standUp();
+ }
+ else
+ {
+ gAgent.sitDown();
+ }
+ }
+ return true;
+ }
+};
+
+bool enable_sit_stand()
+{
+ return enable_sitdown_self() || enable_standup_self();
+}
+
+bool enable_fly_land()
+{
+ return gAgent.getFlying() || LLAgent::enableFlying();
+}
+
class LLCheckPanelPeopleTab : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -4944,7 +4971,7 @@ void handle_buy_or_take()
{
LLStringUtil::format_map_t args;
args["AMOUNT"] = llformat("%d", total_price);
- LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString( "BuyingCosts", args ), total_price );
+ LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString( "this_object_costs", args ), total_price );
}
}
else
@@ -4973,13 +5000,6 @@ bool tools_visible_take_object()
return !is_selection_buy_not_take();
}
-bool enable_how_to_visible(const LLSD& param)
-{
- LLFloaterWebContent::Params p;
- p.target = "__help_how_to";
- return LLFloaterReg::instanceVisible("how_to", p);
-}
-
class LLToolsEnableBuyOrTake : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -5935,6 +5955,16 @@ class LLWorldSetHomeLocation : public view_listener_t
}
};
+class LLWorldLindenHome : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ std::string url = LLFloaterLandHoldings::sHasLindenHome ? LLTrans::getString("lindenhomes_my_home_url") : LLTrans::getString("lindenhomes_get_home_url");
+ LLWeb::loadURL(url);
+ return true;
+ }
+};
+
class LLWorldTeleportHome : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -6017,7 +6047,7 @@ class LLWorldCreateLandmark : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
+ LLFloaterReg::showInstance("add_landmark");
return true;
}
@@ -6348,6 +6378,11 @@ void handle_edit_outfit()
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
+void handle_now_wearing()
+{
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "now_wearing"));
+}
+
void handle_edit_shape()
{
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_shape"));
@@ -7704,15 +7739,7 @@ class LLToggleHowTo : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLFloaterWebContent::Params p;
- std::string url = gSavedSettings.getString("HowToHelpURL");
- p.url = LLWeb::expandURLSubstitutions(url, LLSD());
- p.show_chrome = false;
- p.target = "__help_how_to";
- p.show_page_title = false;
- p.preferred_media_size = LLRect(0, 460, 335, 0);
-
- LLFloaterReg::toggleInstanceOrBringToFront("how_to", p);
+ LLFloaterReg::toggleInstanceOrBringToFront("guidebook");
return true;
}
};
@@ -8582,37 +8609,32 @@ class LLWorldEnvSettings : public view_listener_t
if (event_name == "sunrise")
{
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNRISE);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().updateEnvironment();
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNRISE, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
defocusEnvFloaters();
}
else if (event_name == "noon")
{
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDDAY);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().updateEnvironment();
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDDAY, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
defocusEnvFloaters();
}
else if (event_name == "sunset")
{
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNSET);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().updateEnvironment();
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNSET, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
defocusEnvFloaters();
}
else if (event_name == "midnight")
{
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDNIGHT);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().updateEnvironment();
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDNIGHT, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
defocusEnvFloaters();
}
else if (event_name == "region")
{
LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().updateEnvironment();
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
defocusEnvFloaters();
}
else if (event_name == "pause_clouds")
@@ -8783,6 +8805,17 @@ public:
}
};
+class LLUpdateMembershipLabel : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ const std::string label_str = LLAgentBenefitsMgr::isCurrent("Base") ? LLTrans::getString("MembershipUpgradeText") : LLTrans::getString("MembershipPremiumText");
+ gMenuHolder->childSetLabelArg("Membership", "[Membership]", label_str);
+
+ return true;
+ }
+};
+
void handle_voice_morphing_subscribe()
{
LLWeb::loadURL(LLTrans::getString("voice_morphing_url"));
@@ -8932,11 +8965,13 @@ void initialize_menus()
view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts");
+ view_listener_t::addEnable(new LLUpdateMembershipLabel(), "Membership.UpdateLabel");
+
enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed));
// Agent
commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
- enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying));
+ enable.add("Agent.enableFlyLand", boost::bind(&enable_fly_land));
commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2));
commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2));
commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2));
@@ -8952,6 +8987,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLEnableHoverHeight(), "Edit.EnableHoverHeight");
view_listener_t::addMenu(new LLEnableEditPhysics(), "Edit.EnableEditPhysics");
commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar));
+ commit.add("NowWearing", boost::bind(&handle_now_wearing));
commit.add("EditOutfit", boost::bind(&handle_edit_outfit));
commit.add("EditShape", boost::bind(&handle_edit_shape));
commit.add("HoverHeight", boost::bind(&handle_hover_height));
@@ -8984,9 +9020,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLViewStatusDoNotDisturb(), "View.Status.CheckDoNotDisturb");
view_listener_t::addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
- // Me > Movement
- view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying");
-
//Communicate Nearby chat
view_listener_t::addMenu(new LLCommunicateNearbyChat(), "Communicate.NearbyChat");
@@ -9008,6 +9041,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome");
view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway");
view_listener_t::addMenu(new LLWorldSetDoNotDisturb(), "World.SetDoNotDisturb");
+ view_listener_t::addMenu(new LLWorldLindenHome(), "World.LindenHome");
view_listener_t::addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark");
view_listener_t::addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation");
@@ -9062,7 +9096,6 @@ void initialize_menus()
// Help menu
// most items use the ShowFloater method
view_listener_t::addMenu(new LLToggleHowTo(), "Help.ToggleHowTo");
- enable.add("Help.HowToVisible", boost::bind(&enable_how_to_visible, _2));
// Advanced menu
view_listener_t::addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole");
@@ -9250,11 +9283,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState");
// Self context menu
- view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp");
- enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self));
- view_listener_t::addMenu(new LLSelfSitDown(), "Self.SitDown");
- enable.add("Self.EnableSitDown", boost::bind(&enable_sitdown_self));
- enable.add("Self.ShowSitDown", boost::bind(&show_sitdown_self));
+ view_listener_t::addMenu(new LLSelfToggleSitStand(), "Self.ToggleSitStand");
+ enable.add("Self.EnableSitStand", boost::bind(&enable_sit_stand));
view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments");
view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 0f63c8cf58..36b6971c81 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -188,10 +188,14 @@ extern LLContextMenu *gMenuMuteParticle;
extern LLMenuGL* gAttachSubMenu;
extern LLMenuGL* gDetachSubMenu;
extern LLMenuGL* gTakeOffClothes;
+extern LLMenuGL* gDetachAvatarMenu;
+extern LLMenuGL* gDetachHUDAvatarMenu;
extern LLContextMenu* gAttachScreenPieMenu;
extern LLContextMenu* gDetachScreenPieMenu;
+extern LLContextMenu* gDetachHUDAttSelfMenu;
extern LLContextMenu* gAttachPieMenu;
extern LLContextMenu* gDetachPieMenu;
+extern LLContextMenu* gDetachAttSelfMenu;
extern LLContextMenu* gAttachBodyPartPieMenus[9];
extern LLContextMenu* gDetachBodyPartPieMenus[9];
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 4b231c7067..15181dcd9f 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -830,10 +830,7 @@ void upload_done_callback(
if(!(can_afford_transaction(expected_upload_cost)))
{
- LLStringUtil::format_map_t args;
- args["NAME"] = data->mAssetInfo.getName();
- args["AMOUNT"] = llformat("%d", expected_upload_cost);
- LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("UploadingCosts", args), expected_upload_cost );
+ LLBuyCurrencyHTML::openCurrencyFloater( "", expected_upload_cost );
is_balance_sufficient = FALSE;
}
else if(region)
@@ -967,10 +964,7 @@ void upload_new_resource(
if (balance < uploadInfo->getExpectedUploadCost())
{
// insufficient funds, bail on this upload
- LLStringUtil::format_map_t args;
- args["NAME"] = uploadInfo->getName();
- args["AMOUNT"] = llformat("%d", uploadInfo->getExpectedUploadCost());
- LLBuyCurrencyHTML::openCurrencyFloater(LLTrans::getString("UploadingCosts", args), uploadInfo->getExpectedUploadCost());
+ LLBuyCurrencyHTML::openCurrencyFloater("", uploadInfo->getExpectedUploadCost());
return;
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 458fc3b13d..39c891c9c1 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -116,7 +116,6 @@
#include "llviewerregion.h"
#include "llfloaterregionrestarting.h"
-#include <boost/algorithm/string/split.hpp> //
#include <boost/foreach.hpp>
#include "llnotificationmanager.h" //
@@ -778,7 +777,6 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif
LL_DEBUGS("GroupInvite") << "Successfully sent response to group " << group_id << " invitation" << LL_ENDL;
if (notify_and_update)
{
- LLNotificationsUtil::add("JoinGroupSuccess");
gAgent.sendAgentDataUpdateRequest();
LLGroupMgr::getInstance()->clearGroupData(group_id);
@@ -5058,6 +5056,15 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
// notification was specified using the new mechanism, so we can just handle it here
std::string notificationID;
msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID);
+
+ //SL-13824 skip notification when both joining a group and leaving a group
+ //remove this after server stops sending these messages
+ if (notificationID == "JoinGroupSuccess" ||
+ notificationID == "GroupDepart")
+ {
+ return true;
+ }
+
if (!LLNotifications::getInstance()->templateExists(notificationID))
{
return false;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 395dd0495f..b88baf6aa7 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4880,78 +4880,22 @@ void LLViewerObject::refreshBakeTexture()
}
}
-void LLViewerObject::updateDiffuseMatParams(const U8 te, LLMaterial* mat, LLViewerTexture *imagep, bool baked_texture)
-{
- // Objects getting non-alpha texture and alpha mask can result in graphical bugs, like white or red alphas.
- // To resolve the issue this function provides image format to material and based on format material's
- // getDiffuseAlphaModeRender() function will decide what value to provide to render
- //
- // Unfortunately LLMaterial has no access to diffuse image, so we have to set this data in LLViewerObject
- // regardles of object being used/seen or frequency of image-updates.
- mat->setDiffuseBaked(baked_texture);
-
- if (!baked_texture)
- {
- if (imagep->isMissingAsset())
- {
- mat->setDiffuseFormatPrimary(0);
- }
- else if (0 == imagep->getPrimaryFormat())
- {
- // We don't have information about this texture, wait for it
- mWaitingTextureInfo.insert(uuid_material_mmap_t::value_type(imagep->getID(), material_info(LLRender::DIFFUSE_MAP, te)));
- // Temporary assume RGBA image
- mat->setDiffuseFormatPrimary(GL_RGBA);
- }
- else
- {
- mat->setDiffuseFormatPrimary(imagep->getPrimaryFormat());
- }
- }
-}
-
-S32 LLViewerObject::setDiffuseImageAndParams(const U8 te, LLViewerTexture *imagep)
-{
- LLUUID new_id = imagep->getID();
- S32 retval = LLPrimitive::setTETexture(te, new_id);
-
- LLTextureEntry* tep = getTE(te);
- LLUUID old_image_id = tep->getID();
-
- LLViewerTexture* baked_texture = getBakedTextureForMagicId(new_id);
- mTEImages[te] = baked_texture ? baked_texture : imagep;
- updateAvatarMeshVisibility(new_id, old_image_id);
-
- LLMaterial* mat = tep->getMaterialParams();
- if (mat)
- {
- // Don't update format from texture (and don't shedule one) if material has no alpha mode set,
- // just assume RGBA format, format will get updated with setTEMaterialParams call if mode changes
- if (mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_NONE)
- {
- bool baked = baked_texture != NULL;
- updateDiffuseMatParams(te, mat, imagep, baked);
- }
- else
- {
- mat->setDiffuseFormatPrimary(GL_RGBA);
- }
- }
-
- setChanged(TEXTURE);
- if (mDrawable.notNull())
- {
- gPipeline.markTextured(mDrawable);
- }
-
- return retval;
-}
-
void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
{
if (mTEImages[te] != imagep)
{
- setDiffuseImageAndParams(te, imagep);
+ LLUUID old_image_id = getTE(te) ? getTE(te)->getID() : LLUUID::null;
+
+ LLPrimitive::setTETexture(te, imagep->getID());
+
+ LLViewerTexture* baked_texture = getBakedTextureForMagicId(imagep->getID());
+ mTEImages[te] = baked_texture ? baked_texture : imagep;
+ updateAvatarMeshVisibility(imagep->getID(), old_image_id);
+ setChanged(TEXTURE);
+ if (mDrawable.notNull())
+ {
+ gPipeline.markTextured(mDrawable);
+ }
}
}
@@ -4963,7 +4907,15 @@ S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image)
if (uuid != getTE(te)->getID() ||
uuid == LLUUID::null)
{
- retval = setDiffuseImageAndParams(te, image);
+ retval = LLPrimitive::setTETexture(te, uuid);
+ LLViewerTexture* baked_texture = getBakedTextureForMagicId(uuid);
+ mTEImages[te] = baked_texture ? baked_texture : image;
+ updateAvatarMeshVisibility(uuid,old_image_id);
+ setChanged(TEXTURE);
+ if (mDrawable.notNull())
+ {
+ gPipeline.markTextured(mDrawable);
+ }
}
return retval;
}
@@ -5258,29 +5210,6 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri
return 0;
}
- if (pMaterialParams.notNull()
- && pMaterialParams->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_NONE)
- {
- // Don't update if no alpha is set. If alpha changes, this function will run again,
- // no point in sheduling additional texture callbacks (in updateDiffuseMatParams)
- LLTextureEntry* tex_entry = getTE(te);
- bool is_baked = tex_entry && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(tex_entry->getID());
-
- LLViewerTexture *img_diffuse = getTEImage(te);
- llassert(NULL != img_diffuse);
-
- if (NULL != img_diffuse)
- {
- // Will modify alpha mask provided to renderer to fit image
- updateDiffuseMatParams(te, pMaterialParams.get(), img_diffuse, is_baked);
- }
- else
- {
- LLMaterial *mat = pMaterialParams.get(); // to avoid const
- mat->setDiffuseFormatPrimary(0);
- }
- }
-
retval = LLPrimitive::setTEMaterialParams(te, pMaterialParams);
LL_DEBUGS("Material") << "Changing material params for te " << (S32)te
<< ", object " << mID
@@ -5293,84 +5222,6 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri
return retval;
}
-bool LLViewerObject::notifyAboutCreatingTexture(LLViewerTexture *texture)
-{
- // Confirmation about texture creation, check wait-list
- // and make changes, or return false
-
- std::pair<uuid_material_mmap_t::iterator, uuid_material_mmap_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
-
- bool refresh_materials = false;
-
- // RGB textures without alpha channels won't work right with alpha,
- // we provide format to material for material to decide when to drop alpha
- for (uuid_material_mmap_t::iterator range_it = range.first; range_it != range.second; ++range_it)
- {
- LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
- if (cur_material.notNull()
- && LLRender::DIFFUSE_MAP == range_it->second.map)
- {
- U32 format = texture->getPrimaryFormat();
- if (format != cur_material->getDiffuseFormatPrimary())
- {
- cur_material->setDiffuseFormatPrimary(format);
- refresh_materials = true;
- }
- }
- } //for
-
- if (refresh_materials)
- {
- LLViewerObject::refreshMaterials();
- }
-
- //clear wait-list
- mWaitingTextureInfo.erase(range.first, range.second);
-
- return refresh_materials;
-}
-
-bool LLViewerObject::notifyAboutMissingAsset(LLViewerTexture *texture)
-{
- // When waiting information about texture it turned out to be missing.
- // Confirm the state, update values accordingly
- std::pair<uuid_material_mmap_t::iterator, uuid_material_mmap_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
- if (range.first == range.second) return false;
-
- bool refresh_materials = false;
-
- for (uuid_material_mmap_t::iterator range_it = range.first; range_it != range.second; ++range_it)
- {
- LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
- if (cur_material.isNull())
- continue;
-
- if (range_it->second.map == LLRender::DIFFUSE_MAP)
- {
- LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
- if (cur_material.notNull()
- && LLRender::DIFFUSE_MAP == range_it->second.map)
- {
- if (0 != cur_material->getDiffuseFormatPrimary())
- {
- cur_material->setDiffuseFormatPrimary(0);
- refresh_materials = true;
- }
- }
- }
- } //for
-
- if (refresh_materials)
- {
- LLViewerObject::refreshMaterials();
- }
-
- //clear wait-list
- mWaitingTextureInfo.erase(range.first, range.second);
-
- return refresh_materials;
-}
-
void LLViewerObject::refreshMaterials()
{
setChanged(TEXTURE);
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 9444c4f788..250c4ac328 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -768,12 +768,7 @@ protected:
void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy);
void deleteParticleSource();
void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id);
-
- // Helper function to modify alpha mask provided to render according to image (ex: RGB image will drop alpha mask)
- void updateDiffuseMatParams(const U8 te, LLMaterial* mat, LLViewerTexture *imagep, bool baked_texture);
- // Shared part of code from setTEImage and setTETextureCore
- S32 setDiffuseImageAndParams(const U8 te, LLViewerTexture *imagep);
-
+
private:
void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string
void deleteTEImages(); // correctly deletes list of images
@@ -906,27 +901,10 @@ public:
LLJointRiggingInfoTab mJointRiggingInfoTab;
- bool notifyAboutCreatingTexture(LLViewerTexture *texture);
- bool notifyAboutMissingAsset(LLViewerTexture *texture);
-
private:
LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory.
EObjectUpdateType mLastUpdateType;
BOOL mLastUpdateCached;
-
- struct material_info
- {
- LLRender::eTexIndex map;
- U8 te;
-
- material_info(LLRender::eTexIndex map_, U8 te_)
- : map(map_)
- , te(te_)
- {}
- };
-
- typedef std::multimap<LLUUID, material_info> uuid_material_mmap_t;
- uuid_material_mmap_t mWaitingTextureInfo;
};
///////////////////
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index d5365e4ee8..06172e366d 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1715,9 +1715,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
// Let interesting parties know about agent parcel change.
LLViewerParcelMgr* instance = LLViewerParcelMgr::getInstance();
- // Notify anything that wants to know when the agent changes parcels
- gAgent.changeParcels();
-
if (instance->mTeleportInProgress)
{
instance->mTeleportInProgress = FALSE;
@@ -1733,6 +1730,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
parcel->setParcelEnvironmentVersion(parcel_environment_version);
LL_DEBUGS("ENVIRONMENT") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
+
// Notify anything that wants to know when the agent changes parcels
gAgent.changeParcels();
instance->mTeleportInProgress = FALSE;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 05f88b0a75..314c1a1f1e 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -63,6 +63,7 @@
#include "llsdutil.h"
#include "llcorehttputil.h"
#include "llvoicevivox.h"
+#include "lluiusage.h"
namespace LLStatViewer
{
@@ -577,6 +578,8 @@ void send_viewer_stats(bool include_preferences)
fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets;
fail["missing_updater"] = (S32) LLAppViewer::instance()->isUpdaterMissing();
+ body["ui"] = LLUIUsage::instance().asLLSD();
+
body["stats"]["voice"] = LLVoiceVivoxStats::getInstance()->read();
// Misc stats, two strings and two ints
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 20a22ba45e..ca01bb46aa 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3314,13 +3314,6 @@ void LLViewerLODTexture::processTextureStats()
{
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel);
}
- else if(LLPipeline::sMemAllocationThrottled)//release memory of large textures by decrease their resolutions.
- {
- if(scaleDown())
- {
- mDesiredDiscardLevel = mCachedRawDiscardLevel;
- }
- }
}
bool LLViewerLODTexture::scaleDown()
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 0f96a0b06c..21985d5a8a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -314,6 +314,99 @@ RecordToChatConsole::RecordToChatConsole():
////////////////////////////////////////////////////////////////////////////
//
+// Print Utility
+//
+
+// Convert a normalized float (-1.0 <= x <= +1.0) to a fixed 1.4 format string:
+//
+// s#.####
+//
+// Where:
+// s sign character; space if x is positiv, minus if negative
+// # decimal digits
+//
+// This is similar to printf("%+.4f") except positive numbers are NOT cluttered with a leading '+' sign.
+// NOTE: This does NOT null terminate the output
+void normalized_float_to_string(const float x, char *out_str)
+{
+ static const unsigned char DECIMAL_BCD2[] =
+ {
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
+ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
+ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99
+ };
+
+ int neg = (x < 0);
+ int rem = neg
+ ? (int)(x * -10000.)
+ : (int)(x * 10000.);
+
+ int d10 = rem % 100; rem /= 100;
+ int d32 = rem % 100; rem /= 100;
+
+ out_str[6] = '0' + ((DECIMAL_BCD2[ d10 ] >> 0) & 0xF);
+ out_str[5] = '0' + ((DECIMAL_BCD2[ d10 ] >> 4) & 0xF);
+ out_str[4] = '0' + ((DECIMAL_BCD2[ d32 ] >> 0) & 0xF);
+ out_str[3] = '0' + ((DECIMAL_BCD2[ d32 ] >> 4) & 0xF);
+ out_str[2] = '.';
+ out_str[1] = '0' + (rem & 1);
+ out_str[0] = " -"[neg]; // Could always show '+' for positive but this clutters up the common case
+}
+
+// normalized float
+// printf("%-.4f %-.4f %-.4f")
+// Params:
+// float &matrix_row[4]
+// int matrix_cell_index
+// string out_buffer (size 32)
+// Note: The buffer is assumed to be pre-filled with spaces
+#define MATRIX_ROW_N32_TO_STR(matrix_row, i, out_buffer) \
+ normalized_float_to_string(matrix_row[i+0], out_buffer + 0); \
+ normalized_float_to_string(matrix_row[i+1], out_buffer + 11); \
+ normalized_float_to_string(matrix_row[i+2], out_buffer + 22); \
+ out_buffer[31] = 0;
+
+
+// regular float
+// sprintf(buffer, "%-8.2f %-8.2f %-8.2f", matrix_row[i+0], matrix_row[i+1], matrix_row[i+2]);
+// Params:
+// float &matrix_row[4]
+// int matrix_cell_index
+// char out_buffer[32]
+// Note: The buffer is assumed to be pre-filled with spaces
+#define MATRIX_ROW_F32_TO_STR(matrix_row, i, out_buffer) { \
+ static const char *format[3] = { \
+ "%-8.2f" , /* 0 */ \
+ "> 99K ", /* 1 */ \
+ "< -99K " /* 2 */ \
+ }; \
+ \
+ F32 temp_0 = matrix_row[i+0]; \
+ F32 temp_1 = matrix_row[i+1]; \
+ F32 temp_2 = matrix_row[i+2]; \
+ \
+ U8 flag_0 = (((U8)(temp_0 < -99999.99)) << 1) | ((U8)(temp_0 > 99999.99)); \
+ U8 flag_1 = (((U8)(temp_1 < -99999.99)) << 1) | ((U8)(temp_1 > 99999.99)); \
+ U8 flag_2 = (((U8)(temp_2 < -99999.99)) << 1) | ((U8)(temp_2 > 99999.99)); \
+ \
+ if (temp_0 < 0.f) out_buffer[ 0] = '-'; \
+ if (temp_1 < 0.f) out_buffer[11] = '-'; \
+ if (temp_2 < 0.f) out_buffer[22] = '-'; \
+ \
+ sprintf(out_buffer+ 1,format[flag_0],fabsf(temp_0)); out_buffer[ 1+8] = ' '; \
+ sprintf(out_buffer+12,format[flag_1],fabsf(temp_1)); out_buffer[12+8] = ' '; \
+ sprintf(out_buffer+23,format[flag_2],fabsf(temp_2)); out_buffer[23+8] = 0 ; \
+}
+
+////////////////////////////////////////////////////////////////////////////
+//
// LLDebugText
//
@@ -334,7 +427,11 @@ private:
typedef std::vector<Line> line_list_t;
line_list_t mLineList;
LLColor4 mTextColor;
-
+
+ LLColor4 mBackColor;
+ LLRect mBackRectCamera1;
+ LLRect mBackRectCamera2;
+
void addText(S32 x, S32 y, const std::string &text)
{
mLineList.push_back(Line(text, x, y));
@@ -376,11 +473,22 @@ public:
mTextColor = LLColor4( 0.86f, 0.86f, 0.86f, 1.f );
// Draw stuff growing up from right lower corner of screen
- S32 xpos = mWindow->getWorldViewWidthScaled() - 400;
+ S32 x_right = mWindow->getWorldViewWidthScaled();
+ S32 xpos = x_right - 400;
xpos = llmax(xpos, 0);
S32 ypos = 64;
const S32 y_inc = 20;
+ // Camera matrix text is hard to see again a white background
+ // Add a dark background underneath the matrices for readability (contrast)
+ mBackRectCamera1.mLeft = xpos;
+ mBackRectCamera1.mRight = x_right;
+ mBackRectCamera1.mTop = -1;
+ mBackRectCamera1.mBottom = -1;
+ mBackRectCamera2 = mBackRectCamera1;
+
+ mBackColor = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
+
clearText();
if (gSavedSettings.getBOOL("DebugShowTime"))
@@ -716,48 +824,45 @@ public:
}
if (gSavedSettings.getBOOL("DebugShowRenderMatrices"))
{
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLProjection[12], gGLProjection[13], gGLProjection[14], gGLProjection[15]));
- ypos += y_inc;
+ char camera_lines[8][32];
+ memset(camera_lines, ' ', sizeof(camera_lines));
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLProjection[8], gGLProjection[9], gGLProjection[10], gGLProjection[11]));
- ypos += y_inc;
-
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLProjection[4], gGLProjection[5], gGLProjection[6], gGLProjection[7]));
- ypos += y_inc;
-
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLProjection[0], gGLProjection[1], gGLProjection[2], gGLProjection[3]));
- ypos += y_inc;
+ // Projection last column is always <0,0,-1.0001,0>
+ // Projection last row is always <0,0,-0.2>
+ mBackRectCamera1.mBottom = ypos - y_inc + 2;
+ MATRIX_ROW_N32_TO_STR(gGLProjection, 12,camera_lines[7]); addText(xpos, ypos, std::string(camera_lines[7])); ypos += y_inc;
+ MATRIX_ROW_N32_TO_STR(gGLProjection, 8,camera_lines[6]); addText(xpos, ypos, std::string(camera_lines[6])); ypos += y_inc;
+ MATRIX_ROW_N32_TO_STR(gGLProjection, 4,camera_lines[5]); addText(xpos, ypos, std::string(camera_lines[5])); ypos += y_inc; mBackRectCamera1.mTop = ypos + 2;
+ MATRIX_ROW_N32_TO_STR(gGLProjection, 0,camera_lines[4]); addText(xpos, ypos, std::string(camera_lines[4])); ypos += y_inc; mBackRectCamera2.mBottom = ypos + 2;
addText(xpos, ypos, "Projection Matrix");
ypos += y_inc;
-
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLModelView[12], gGLModelView[13], gGLModelView[14], gGLModelView[15]));
- ypos += y_inc;
-
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLModelView[8], gGLModelView[9], gGLModelView[10], gGLModelView[11]));
- ypos += y_inc;
-
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLModelView[4], gGLModelView[5], gGLModelView[6], gGLModelView[7]));
- ypos += y_inc;
-
- addText(xpos, ypos, llformat("%.4f .%4f %.4f %.4f", gGLModelView[0], gGLModelView[1], gGLModelView[2], gGLModelView[3]));
- ypos += y_inc;
+ // View last column is always <0,0,0,1>
+ MATRIX_ROW_F32_TO_STR(gGLModelView, 12,camera_lines[3]); addText(xpos, ypos, std::string(camera_lines[3])); ypos += y_inc;
+ MATRIX_ROW_N32_TO_STR(gGLModelView, 8,camera_lines[2]); addText(xpos, ypos, std::string(camera_lines[2])); ypos += y_inc;
+ MATRIX_ROW_N32_TO_STR(gGLModelView, 4,camera_lines[1]); addText(xpos, ypos, std::string(camera_lines[1])); ypos += y_inc; mBackRectCamera2.mTop = ypos + 2;
+ MATRIX_ROW_N32_TO_STR(gGLModelView, 0,camera_lines[0]); addText(xpos, ypos, std::string(camera_lines[0])); ypos += y_inc;
addText(xpos, ypos, "View Matrix");
ypos += y_inc;
}
// disable use of glReadPixels which messes up nVidia nSight graphics debugging
- if (gSavedSettings.getBOOL("DebugShowColor") && !LLRender::sNsightDebugSupport)
- {
- U8 color[4];
- LLCoordGL coord = gViewerWindow->getCurrentMouse();
- glReadPixels(coord.mX, coord.mY, 1,1,GL_RGBA, GL_UNSIGNED_BYTE, color);
- addText(xpos, ypos, llformat("%d %d %d %d", color[0], color[1], color[2], color[3]));
- ypos += y_inc;
- }
+ if (gSavedSettings.getBOOL("DebugShowColor") && !LLRender::sNsightDebugSupport)
+ {
+ U8 color[4];
+ LLCoordGL coord = gViewerWindow->getCurrentMouse();
- // only display these messages if we are actually rendering beacons at this moment
+ // Convert x,y to raw pixel coords
+ S32 x_raw = llround(coord.mX * gViewerWindow->getWindowWidthRaw() / (F32) gViewerWindow->getWindowWidthScaled());
+ S32 y_raw = llround(coord.mY * gViewerWindow->getWindowHeightRaw() / (F32) gViewerWindow->getWindowHeightScaled());
+
+ glReadPixels(x_raw, y_raw, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, color);
+ addText(xpos, ypos, llformat("Pixel <%1d, %1d> R:%1d G:%1d B:%1d A:%1d", x_raw, y_raw, color[0], color[1], color[2], color[3]));
+ ypos += y_inc;
+ }
+
+ // only display these messages if we are actually rendering beacons at this moment
if (LLPipeline::getRenderBeacons() && LLFloaterReg::instanceVisible("beacons"))
{
if (LLPipeline::getRenderMOAPBeacons())
@@ -884,6 +989,18 @@ public:
void draw()
{
LL_RECORD_BLOCK_TIME(FTM_DISPLAY_DEBUG_TEXT);
+
+ // Camera matrix text is hard to see again a white background
+ // Add a dark background underneath the matrices for readability (contrast)
+ if (mBackRectCamera1.mTop >= 0)
+ {
+ mBackColor.setAlpha( 0.75f );
+ gl_rect_2d(mBackRectCamera1, mBackColor, true);
+
+ mBackColor.setAlpha( 0.66f );
+ gl_rect_2d(mBackRectCamera2, mBackColor, true);
+ }
+
for (line_list_t::iterator iter = mLineList.begin();
iter != mLineList.end(); ++iter)
{
@@ -892,7 +1009,6 @@ public:
LLFontGL::LEFT, LLFontGL::TOP,
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
}
- mLineList.clear();
}
};
@@ -1800,8 +1916,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
ms_sleep(5000) ; //wait for 5 seconds.
LLSplashScreen::update(LLTrans::getString("ShuttingDown"));
-#if LL_LINUX || LL_SOLARIS
- LL_WARNS() << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information."
+#if LL_LINUX
+ LL_WARNS() << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt for further information."
<< LL_ENDL;
#else
LL_WARNS("Window") << "Unable to create window, be sure screen is set at 32-bit color in Control Panels->Display->Settings"
@@ -4735,10 +4851,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
return FALSE;
}
//check if there is enough memory for the snapshot image
- if(LLPipeline::sMemAllocationThrottled)
- {
- return FALSE ; //snapshot taking is disabled due to memory restriction.
- }
if(image_width * image_height > (1 << 22)) //if snapshot image is larger than 2K by 2K
{
if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3))
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 458d8ced65..7faca2ee5b 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -465,6 +465,8 @@ BOOL LLVOAvatarSelf::buildMenus()
if (gDetachBodyPartPieMenus[i])
{
gDetachPieMenu->appendContextSubMenu( gDetachBodyPartPieMenus[i] );
+ gDetachAttSelfMenu->appendContextSubMenu(gDetachBodyPartPieMenus[i]);
+ gDetachAvatarMenu->appendContextSubMenu(gDetachBodyPartPieMenus[i]);
}
else
{
@@ -493,12 +495,14 @@ BOOL LLVOAvatarSelf::buildMenus()
LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gDetachPieMenu->addChild(item);
-
+ gDetachAttSelfMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
+ gDetachAvatarMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
break;
}
}
}
}
+
// add screen attachments
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
@@ -532,6 +536,8 @@ BOOL LLVOAvatarSelf::buildMenus()
item_params.on_enable.parameter = iter->first;
item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gDetachScreenPieMenu->addChild(item);
+ gDetachHUDAttSelfMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
+ gDetachHUDAvatarMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
}
}
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index f9ffefd4a2..7d8aa6fbbd 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -359,7 +359,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
// gMuteListp->addObserver(&mutelist_listener);
-#if LL_DARWIN || LL_LINUX || LL_SOLARIS
+#if LL_DARWIN || LL_LINUX
// HACK: THIS DOES NOT BELONG HERE
// When the vivox daemon dies, the next write attempt on our socket generates a SIGPIPE, which kills us.
// This should cause us to ignore SIGPIPE and handle the error through proper channels.
@@ -684,6 +684,21 @@ void LLVivoxVoiceClient::voiceControlCoro()
bool success = startAndConnectSession();
if (success)
{
+ // enable/disable the automatic VAD and explicitly set the initial values of
+ // the VAD variables ourselves when it is off - see SL-15072 for more details
+ // note: we set the other parameters too even if the auto VAD is on which is ok
+ unsigned int vad_auto = gSavedSettings.getU32("VivoxVadAuto");
+ unsigned int vad_hangover = gSavedSettings.getU32("VivoxVadHangover");
+ unsigned int vad_noise_floor = gSavedSettings.getU32("VivoxVadNoiseFloor");
+ unsigned int vad_sensitivity = gSavedSettings.getU32("VivoxVadSensitivity");
+ setupVADParams(vad_auto, vad_hangover, vad_noise_floor, vad_sensitivity);
+
+ // watch for changes to the VAD settings via Debug Settings UI and act on them accordingly
+ gSavedSettings.getControl("VivoxVadAuto")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
+ gSavedSettings.getControl("VivoxVadHangover")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
+ gSavedSettings.getControl("VivoxVadNoiseFloor")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
+ gSavedSettings.getControl("VivoxVadSensitivity")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
+
if (mTuningMode)
{
performMicTuning();
@@ -3230,6 +3245,73 @@ void LLVivoxVoiceClient::sendLocalAudioUpdates()
}
}
+/**
+ * Because of the recurring voice cutout issues (SL-15072) we are going to try
+ * to disable the automatic VAD (Voice Activity Detection) and set the associated
+ * parameters directly. We will expose them via Debug Settings and that should
+ * let us iterate on a collection of values that work for us. Hopefully!
+ *
+ * From the VIVOX Docs:
+ *
+ * VadAuto: A flag indicating if the automatic VAD is enabled (1) or disabled (0)
+ *
+ * VadHangover: The time (in milliseconds) that it takes
+ * for the VAD to switch back to silence from speech mode after the last speech
+ * frame has been detected.
+ *
+ * VadNoiseFloor: A dimensionless value between 0 and
+ * 20000 (default 576) that controls the maximum level at which the noise floor
+ * may be set at by the VAD's noise tracking. Too low of a value will make noise
+ * tracking ineffective (A value of 0 disables noise tracking and the VAD then
+ * relies purely on the sensitivity property). Too high of a value will make
+ * long speech classifiable as noise.
+ *
+ * VadSensitivity: A dimensionless value between 0 and
+ * 100, indicating the 'sensitivity of the VAD'. Increasing this value corresponds
+ * to decreasing the sensitivity of the VAD (i.e. '0' is most sensitive,
+ * while 100 is 'least sensitive')
+ */
+void LLVivoxVoiceClient::setupVADParams(unsigned int vad_auto,
+ unsigned int vad_hangover,
+ unsigned int vad_noise_floor,
+ unsigned int vad_sensitivity)
+{
+ std::ostringstream stream;
+
+ LL_INFOS("Voice") << "Setting the automatic VAD to "
+ << (vad_auto ? "True" : "False")
+ << " and discrete values to"
+ << " VadHangover = " << vad_hangover
+ << ", VadSensitivity = " << vad_sensitivity
+ << ", VadNoiseFloor = " << vad_noise_floor
+ << LL_ENDL;
+
+ // Create a request to set the VAD parameters:
+ stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetVadProperties.1\">"
+ << "<VadAuto>" << vad_auto << "</VadAuto>"
+ << "<VadHangover>" << vad_hangover << "</VadHangover>"
+ << "<VadSensitivity>" << vad_sensitivity << "</VadSensitivity>"
+ << "<VadNoiseFloor>" << vad_noise_floor << "</VadNoiseFloor>"
+ << "</Request>\n\n\n";
+
+ if (!stream.str().empty())
+ {
+ writeString(stream.str());
+ }
+}
+
+void LLVivoxVoiceClient::onVADSettingsChange()
+{
+ // pick up the VAD variables (one of which was changed)
+ unsigned int vad_auto = gSavedSettings.getU32("VivoxVadAuto");
+ unsigned int vad_hangover = gSavedSettings.getU32("VivoxVadHangover");
+ unsigned int vad_noise_floor = gSavedSettings.getU32("VivoxVadNoiseFloor");
+ unsigned int vad_sensitivity = gSavedSettings.getU32("VivoxVadSensitivity");
+
+ // build a VAD params change request and send it to SLVoice
+ setupVADParams(vad_auto, vad_hangover, vad_noise_floor, vad_sensitivity);
+}
+
/////////////////////////////
// Response/Event handlers
@@ -7582,6 +7664,18 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
{
LLVivoxVoiceClient::getInstance()->accountGetTemplateFontsResponse(statusCode, statusString);
}
+ else if (!stricmp(actionCstr, "Aux.SetVadProperties.1"))
+ {
+ // both values of statusCode (old and more recent) indicate valid requests
+ if (statusCode != 0 && statusCode != 200)
+ {
+ LL_WARNS("Voice") << "Aux.SetVadProperties.1 request failed: "
+ << "statusCode: " << statusCode
+ << " and "
+ << "statusString: " << statusString
+ << LL_ENDL;
+ }
+ }
/*
else if (!stricmp(actionCstr, "Account.ChannelGetList.1"))
{
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 699c85066b..746201af04 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -473,6 +473,12 @@ protected:
void muteListChanged();
/////////////////////////////
+ // VAD changes
+ // disable auto-VAD and configure VAD parameters explicitly
+ void setupVADParams(unsigned int vad_auto, unsigned int vad_hangover, unsigned int vad_noise_floor, unsigned int vad_sensitivity);
+ void onVADSettingsChange();
+
+ /////////////////////////////
// Sending updates of current state
void updatePosition(void);
void setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot);
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 2037aca7e9..878d7287ed 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -209,14 +209,7 @@ void LLSkyTex::create()
void LLSkyTex::createGLImage(S32 which)
{
- if (mIsShiny)
- {
- mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA);
- }
- else
- {
- mTexture[which]->setExplicitFormat(GL_SRGB8_ALPHA8, GL_RGBA);
- }
+ mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA);
mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL);
mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP);
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2d1a882a7e..3bdb8a2981 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2295,11 +2295,243 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
return res;
}
+bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture)
+{ //Ok, here we have confirmation about texture creation, check our wait-list
+ //and make changes, or return false
+
+ std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
+
+ typedef std::map<U8, LLMaterialPtr> map_te_material;
+ map_te_material new_material;
+
+ for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
+ {
+ LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+
+ //here we just interesting in DIFFUSE_MAP only!
+ if(NULL != cur_material.get() && LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat())
+ { //ok let's check the diffuse mode
+ switch(cur_material->getDiffuseAlphaMode())
+ {
+ case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
+ { //uups... we have non 32 bit texture with LLMaterial::DIFFUSE_ALPHA_MODE_* => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+
+ } break;
+ } //switch
+ } //if
+ } //for
+
+ //setup new materials
+ for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
+ {
+ LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second);
+ LLViewerObject::setTEMaterialParams(it->first, it->second);
+ }
+
+ //clear wait-list
+ mWaitingTextureInfo.erase(range.first, range.second);
+
+ return 0 != new_material.size();
+}
+
+bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
+{ //Ok, here if we wait information about texture and it's missing
+ //then depending from the texture map (diffuse, normal, or specular)
+ //make changes in material and confirm it. If not return false.
+ std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
+ if(range.first == range.second) return false;
+
+ typedef std::map<U8, LLMaterialPtr> map_te_material;
+ map_te_material new_material;
+
+ for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
+ {
+ LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+ if (cur_material.isNull())
+ continue;
+
+ switch(range_it->second.map)
+ {
+ case LLRender::DIFFUSE_MAP:
+ {
+ if(LLMaterial::DIFFUSE_ALPHA_MODE_NONE != cur_material->getDiffuseAlphaMode())
+ { //missing texture + !LLMaterial::DIFFUSE_ALPHA_MODE_NONE => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+ }
+ } break;
+ case LLRender::NORMAL_MAP:
+ { //missing texture => reset material texture id
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setNormalID(LLUUID::null);
+ } break;
+ case LLRender::SPECULAR_MAP:
+ { //missing texture => reset material texture id
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setSpecularID(LLUUID::null);
+ } break;
+ case LLRender::NUM_TEXTURE_CHANNELS:
+ //nothing to do, make compiler happy
+ break;
+ } //switch
+ } //for
+
+ //setup new materials
+ for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
+ {
+ LLMaterialMgr::getInstance()->setLocalMaterial(getRegion()->getRegionID(), it->second);
+ LLViewerObject::setTEMaterialParams(it->first, it->second);
+ }
+
+ //clear wait-list
+ mWaitingTextureInfo.erase(range.first, range.second);
+
+ return 0 != new_material.size();
+}
+
S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
{
- S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+ LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams);
+
+ if(pMaterialParams)
+ { //check all of them according to material settings
+
+ LLViewerTexture *img_diffuse = getTEImage(te);
+ LLViewerTexture *img_normal = getTENormalMap(te);
+ LLViewerTexture *img_specular = getTESpecularMap(te);
+
+ llassert(NULL != img_diffuse);
+
+ LLMaterialPtr new_material = NULL;
+
+ //diffuse
+ if(NULL != img_diffuse)
+ { //guard
+ if(0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset())
+ { //ok here we don't have information about texture, let's belief and leave material settings
+ //but we remember this case
+ mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te)));
+ }
+ else
+ {
+ bool bSetDiffuseNone = false;
+ if(img_diffuse->isMissingAsset())
+ {
+ bSetDiffuseNone = true;
+ }
+ else
+ {
+ switch(pMaterialParams->getDiffuseAlphaMode())
+ {
+ case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
+ { //all of them modes available only for 32 bit textures
+ LLTextureEntry* tex_entry = getTE(te);
+ bool bIsBakedImageId = false;
+ if (tex_entry && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(tex_entry->getID()))
+ {
+ bIsBakedImageId = true;
+ }
+ if (GL_RGBA != img_diffuse->getPrimaryFormat() && !bIsBakedImageId)
+ {
+ bSetDiffuseNone = true;
+ }
+ } break;
+ }
+ } //else
+
+
+ if(bSetDiffuseNone)
+ { //upps... we should substitute this material with LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+ new_material = new LLMaterial(pMaterialParams->asLLSD());
+ new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+ }
+ }
+ }
+
+ //normal
+ if(LLUUID::null != pMaterialParams->getNormalID())
+ {
+ if(img_normal && img_normal->isMissingAsset() && img_normal->getID() == pMaterialParams->getNormalID())
+ {
+ if(!new_material) {
+ new_material = new LLMaterial(pMaterialParams->asLLSD());
+ }
+ new_material->setNormalID(LLUUID::null);
+ }
+ else if(NULL == img_normal || 0 == img_normal->getPrimaryFormat())
+ { //ok here we don't have information about texture, let's belief and leave material settings
+ //but we remember this case
+ mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getNormalID(), material_info(LLRender::NORMAL_MAP,te)));
+ }
+
+ }
+
+
+ //specular
+ if(LLUUID::null != pMaterialParams->getSpecularID())
+ {
+ if(img_specular && img_specular->isMissingAsset() && img_specular->getID() == pMaterialParams->getSpecularID())
+ {
+ if(!new_material) {
+ new_material = new LLMaterial(pMaterialParams->asLLSD());
+ }
+ new_material->setSpecularID(LLUUID::null);
+ }
+ else if(NULL == img_specular || 0 == img_specular->getPrimaryFormat())
+ { //ok here we don't have information about texture, let's belief and leave material settings
+ //but we remember this case
+ mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getSpecularID(), material_info(LLRender::SPECULAR_MAP, te)));
+ }
+ }
+
+ if(new_material) {
+ pMaterial = new_material;
+ LLMaterialMgr::getInstance()->setLocalMaterial(getRegion()->getRegionID(), pMaterial);
+ }
+ }
+
+ S32 res = LLViewerObject::setTEMaterialParams(te, pMaterial);
- LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res
+ LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterial) ? pMaterial->asLLSD() : LLSD("null")) << " res " << res
<< ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
<< LL_ENDL;
setChanged(ALL_CHANGED);
@@ -4366,7 +4598,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
LLMaterial* mat = te->getMaterialParams();
if (mat)
{
- U8 mode = mat->getDiffuseAlphaModeRender();
+ U8 mode = mat->getDiffuseAlphaMode();
if (mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE
|| mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE
@@ -5012,7 +5244,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
}
draw_info->mAlphaMaskCutoff = mat->getAlphaMaskCutoff() * (1.f / 255.f);
- draw_info->mDiffuseAlphaMode = mat->getDiffuseAlphaModeRender();
+ draw_info->mDiffuseAlphaMode = mat->getDiffuseAlphaMode();
draw_info->mNormalMap = facep->getViewerObject()->getTENormalMap(facep->getTEOffset());
}
else
@@ -5374,7 +5606,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (mat && LLPipeline::sRenderDeferred)
{
- U8 alpha_mode = mat->getDiffuseAlphaModeRender();
+ U8 alpha_mode = mat->getDiffuseAlphaMode();
bool is_alpha = type == LLDrawPool::POOL_ALPHA &&
(alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND ||
@@ -5403,7 +5635,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
else if (mat)
{
bool is_alpha = type == LLDrawPool::POOL_ALPHA;
- U8 mode = mat->getDiffuseAlphaModeRender();
+ U8 mode = mat->getDiffuseAlphaMode();
bool can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
@@ -6301,7 +6533,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
bool can_be_shiny = true;
if (mat)
{
- U8 mode = mat->getDiffuseAlphaModeRender();
+ U8 mode = mat->getDiffuseAlphaMode();
can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
}
@@ -6323,7 +6555,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
//
if (te->getFullbright())
{
- if (mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
if (opaque)
{
@@ -6408,7 +6640,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
else if (mat)
{
- U8 mode = mat->getDiffuseAlphaModeRender();
+ U8 mode = mat->getDiffuseAlphaMode();
is_alpha = (is_alpha || (mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND));
@@ -6507,7 +6739,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
else if (fullbright || bake_sunlight)
{ //fullbright
- if (mat && mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK);
}
@@ -6529,7 +6761,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
else
{ //all around simple
llassert(mask & LLVertexBuffer::MAP_NORMAL);
- if (mat && mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{ //material alpha mask can be respected in non-deferred
registerFace(group, facep, LLRenderPass::PASS_ALPHA_MASK);
}
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 97888ed869..ce400a3498 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -441,6 +441,26 @@ protected:
static S32 sNumLODChanges;
friend class LLVolumeImplFlexible;
+
+public:
+ bool notifyAboutCreatingTexture(LLViewerTexture *texture);
+ bool notifyAboutMissingAsset(LLViewerTexture *texture);
+
+private:
+ struct material_info
+ {
+ LLRender::eTexIndex map;
+ U8 te;
+
+ material_info(LLRender::eTexIndex map_, U8 te_)
+ : map(map_)
+ , te(te_)
+ {}
+ };
+
+ typedef std::multimap<LLUUID, material_info> mmap_UUID_MAP_t;
+ mmap_UUID_MAP_t mWaitingTextureInfo;
+
};
#endif // LL_LLVOVOLUME_H
diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp
index a2e519a61a..040d0deaf3 100644
--- a/indra/newview/llworldmipmap.cpp
+++ b/indra/newview/llworldmipmap.cpp
@@ -190,6 +190,8 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32
//LL_INFOS("WorldMap") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL;
LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ LL_INFOS("MAPURL") << "fetching map tile from " << imageurl << LL_ENDL;
+
img->setBoostLevel(LLGLTexture::BOOST_MAP);
// Return the smart pointer
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bd667acb53..cd1b9c7c69 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -129,6 +129,16 @@
//
#define MATERIALS_IN_REFLECTIONS 0
+// NOTE: Keep in sync with indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+// NOTE: Unused consts are commented out since some compilers (on macOS) may complain about unused variables.
+// const S32 WATER_REFLECT_NONE_WATER_OPAQUE = -2;
+ const S32 WATER_REFLECT_NONE_WATER_TRANSPARENT = -1;
+ const S32 WATER_REFLECT_MINIMAL = 0;
+// const S32 WATER_REFLECT_TERRAIN = 1;
+ const S32 WATER_REFLECT_STATIC_OBJECTS = 2;
+ const S32 WATER_REFLECT_AVATARS = 3;
+ const S32 WATER_REFLECT_EVERYTHING = 4;
+
bool gShiftFrame = false;
//cached settings
@@ -348,7 +358,6 @@ bool LLPipeline::sRenderFrameTest = false;
bool LLPipeline::sRenderAttachedLights = true;
bool LLPipeline::sRenderAttachedParticles = true;
bool LLPipeline::sRenderDeferred = false;
-bool LLPipeline::sMemAllocationThrottled = false;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
bool LLPipeline::sRenderingHUDs;
@@ -718,24 +727,6 @@ void LLPipeline::destroyGL()
static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
-//static
-void LLPipeline::throttleNewMemoryAllocation(bool disable)
-{
- if(sMemAllocationThrottled != disable)
- {
- sMemAllocationThrottled = disable ;
-
- if(sMemAllocationThrottled)
- {
- //send out notification
- LLNotification::Params params("LowMemory");
- LLNotifications::instance().add(params);
-
- //release some memory.
- }
- }
-}
-
void LLPipeline::requestResizeScreenTexture()
{
gResizeScreenTexture = TRUE;
@@ -1677,7 +1668,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
if (alpha && mat)
{
- switch (mat->getDiffuseAlphaModeRender())
+ switch (mat->getDiffuseAlphaMode())
{
case 1:
alpha = true; // Material's alpha mode is set to blend. Toss it into the alpha draw pool.
@@ -9270,30 +9261,29 @@ inline float sgn(float a)
}
void LLPipeline::generateWaterReflection(LLCamera& camera_in)
-{
- if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
- {
- bool skip_avatar_update = false;
- if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
- {
- skip_avatar_update = true;
- }
-
- LLCamera camera = camera_in;
+{
+ if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
+ {
+ bool skip_avatar_update = false;
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
+ {
+ skip_avatar_update = true;
+ }
+ LLCamera camera = camera_in;
camera.setFar(camera_in.getFar() * 0.75f);
bool camera_is_underwater = LLViewerCamera::getInstance()->cameraUnderWater();
- LLPipeline::sReflectionRender = true;
-
- gPipeline.pushRenderTypeMask();
+ LLPipeline::sReflectionRender = true;
+
+ gPipeline.pushRenderTypeMask();
glh::matrix4f saved_modelview = get_current_modelview();
glh::matrix4f saved_projection = get_current_projection();
- glh::matrix4f mat;
+ glh::matrix4f mat;
- S32 detail = RenderReflectionDetail;
+ S32 reflection_detail = RenderReflectionDetail;
F32 water_height = gAgent.getRegion()->getWaterHeight();
F32 camera_height = camera_in.getOrigin().mV[VZ];
@@ -9307,32 +9297,34 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
camera.setOriginAndLookAt(reflect_origin, LLVector3::z_axis, reflect_interest_point);
- //plane params
+ //plane params
LLPlane plane;
- LLVector3 pnorm;
- S32 water_clip = 0;
+ LLVector3 pnorm;
+ S32 water_clip = 0;
if (!camera_is_underwater)
- { //camera is above water, clip plane points up
- pnorm.setVec(0,0,1);
+ {
+ //camera is above water, clip plane points up
+ pnorm.setVec(0,0,1);
plane.setVec(pnorm, -water_height);
water_clip = 1;
- }
- else
- { //camera is below water, clip plane points down
- pnorm = LLVector3(0,0,-1);
+ }
+ else
+ {
+ //camera is below water, clip plane points down
+ pnorm = LLVector3(0,0,-1);
plane.setVec(pnorm, water_height);
water_clip = -1;
- }
+ }
S32 occlusion = LLPipeline::sUseOcclusion;
- //disable occlusion culling for reflection map for now
- LLPipeline::sUseOcclusion = 0;
+ //disable occlusion culling for reflection map for now
+ LLPipeline::sUseOcclusion = 0;
if (!camera_is_underwater)
- { //generate planar reflection map
-
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WATER0;
+ {
+ //generate planar reflection map
+ LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WATER0;
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
@@ -9345,9 +9337,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
mReflectionModelView = mat;
set_current_modelview(mat);
- gGL.loadMatrix(mat.m);
+ gGL.loadMatrix(mat.m);
- LLViewerCamera::updateFrustumPlanes(camera, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(camera, FALSE, TRUE);
glh::vec3f origin(0, 0, 0);
glh::matrix4f inv_mat = mat.inverse();
@@ -9355,10 +9347,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
camera.setOrigin(origin.v);
- glCullFace(GL_FRONT);
+ glCullFace(GL_FRONT);
- if (LLDrawPoolWater::sNeedsReflectionUpdate)
- {
+ if (LLDrawPoolWater::sNeedsReflectionUpdate)
+ {
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
glClearColor(0,0,0,0);
mWaterRef.bindTarget();
@@ -9368,106 +9360,127 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gGL.setColorMask(true, false);
mWaterRef.getViewport(gGLViewport);
- //initial sky pass (no user clip plane)
- { //mask out everything but the sky
- gPipeline.pushRenderTypeMask();
- gPipeline.andRenderTypeMask(LLPipeline::RENDER_TYPE_SKY,
- LLPipeline::RENDER_TYPE_WL_SKY,
- LLPipeline::RENDER_TYPE_CLOUDS,
- LLPipeline::END_RENDER_TYPES);
+ //initial sky pass (no user clip plane)
+ //mask out everything but the sky
+ gPipeline.pushRenderTypeMask();
+ {
+ if (reflection_detail >= WATER_REFLECT_MINIMAL)
+ {
+ gPipeline.andRenderTypeMask(
+ LLPipeline::RENDER_TYPE_SKY,
+ LLPipeline::RENDER_TYPE_WL_SKY,
+ LLPipeline::RENDER_TYPE_CLOUDS,
+ LLPipeline::END_RENDER_TYPES);
+ }
+ else
+ {
+ gPipeline.andRenderTypeMask(
+ LLPipeline::RENDER_TYPE_SKY,
+ LLPipeline::RENDER_TYPE_WL_SKY,
+ LLPipeline::END_RENDER_TYPES);
+ }
updateCull(camera, mSky);
stateSort(camera, mSky);
- renderGeom(camera, TRUE);
-
- gPipeline.popRenderTypeMask();
- }
+ renderGeom(camera, TRUE);
+ }
+ gPipeline.popRenderTypeMask();
- gPipeline.pushRenderTypeMask();
+ if (reflection_detail >= WATER_REFLECT_NONE_WATER_TRANSPARENT)
+ {
+ gPipeline.pushRenderTypeMask();
+ {
+ clearRenderTypeMask(
+ LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
+ LLPipeline::RENDER_TYPE_GROUND,
+ LLPipeline::RENDER_TYPE_SKY,
+ LLPipeline::RENDER_TYPE_CLOUDS,
+ LLPipeline::END_RENDER_TYPES);
+
+ if (reflection_detail > WATER_REFLECT_MINIMAL)
+ { //mask out selected geometry based on reflection detail
+ if (reflection_detail < WATER_REFLECT_EVERYTHING)
+ {
+ clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
+ if (reflection_detail < WATER_REFLECT_AVATARS)
+ {
+ clearRenderTypeMask(
+ LLPipeline::RENDER_TYPE_AVATAR,
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
+ END_RENDER_TYPES);
+ if (reflection_detail < WATER_REFLECT_STATIC_OBJECTS)
+ {
+ clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
+ }
+ }
+ }
- clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
- LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_GROUND,
- LLPipeline::RENDER_TYPE_SKY,
- LLPipeline::RENDER_TYPE_CLOUDS,
- LLPipeline::END_RENDER_TYPES);
-
- if (detail > 0)
- { //mask out selected geometry based on reflection detail
- if (detail < 4)
- {
- clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
- if (detail < 3)
- {
- clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, LLPipeline::RENDER_TYPE_CONTROL_AV, END_RENDER_TYPES);
- if (detail < 2)
- {
- clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
- }
- }
- }
+ LLGLUserClipPlane clip_plane(plane, mReflectionModelView, saved_projection);
+ LLGLDisable cull(GL_CULL_FACE);
+ updateCull(camera, mReflectedObjects, -water_clip, &plane);
+ stateSort(camera, mReflectedObjects);
+ renderGeom(camera);
+ }
+ }
+ gPipeline.popRenderTypeMask();
+ }
- LLGLUserClipPlane clip_plane(plane, mReflectionModelView, saved_projection);
- LLGLDisable cull(GL_CULL_FACE);
- updateCull(camera, mReflectedObjects, -water_clip, &plane);
- stateSort(camera, mReflectedObjects);
- renderGeom(camera);
- }
- gPipeline.popRenderTypeMask();
mWaterRef.flush();
- }
+ }
- glCullFace(GL_BACK);
+ glCullFace(GL_BACK);
gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.popMatrix();
-
+ gGL.popMatrix();
+
set_current_modelview(saved_modelview);
- }
+ }
//LLPipeline::sUseOcclusion = occlusion;
- camera.setOrigin(camera_in.getOrigin());
- //render distortion map
- static bool last_update = true;
- if (last_update)
- {
+ camera.setOrigin(camera_in.getOrigin());
+ //render distortion map
+ static bool last_update = true;
+ if (last_update)
+ {
gPipeline.pushRenderTypeMask();
- camera.setFar(camera_in.getFar());
- clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
- LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_GROUND,
- END_RENDER_TYPES);
+ camera.setFar(camera_in.getFar());
+ clearRenderTypeMask(
+ LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
+ LLPipeline::RENDER_TYPE_GROUND,
+ END_RENDER_TYPES);
// intentionally inverted so that distortion map contents (objects under the water when we're above it)
// will properly include water fog effects
LLPipeline::sUnderWaterRender = !camera_is_underwater;
- if (LLPipeline::sUnderWaterRender)
- {
+ if (LLPipeline::sUnderWaterRender)
+ {
clearRenderTypeMask(
- LLPipeline::RENDER_TYPE_GROUND,
- LLPipeline::RENDER_TYPE_SKY,
- LLPipeline::RENDER_TYPE_CLOUDS,
- LLPipeline::RENDER_TYPE_WL_SKY,
- END_RENDER_TYPES);
- }
- LLViewerCamera::updateFrustumPlanes(camera);
+ LLPipeline::RENDER_TYPE_GROUND,
+ LLPipeline::RENDER_TYPE_SKY,
+ LLPipeline::RENDER_TYPE_CLOUDS,
+ LLPipeline::RENDER_TYPE_WL_SKY,
+ END_RENDER_TYPES);
+ }
+ LLViewerCamera::updateFrustumPlanes(camera);
+
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-
if (LLPipeline::sUnderWaterRender || LLDrawPoolWater::sNeedsDistortionUpdate)
{
LLPipeline::sDistortionRender = true;
LLColor3 col = LLEnvironment::instance().getCurrentWater()->getWaterFogColor();
- glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
+ glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
+
+ LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WATER1;
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WATER1;
-
mWaterDis.bindTarget();
- mWaterDis.getViewport(gGLViewport);
-
+ mWaterDis.getViewport(gGLViewport);
+
gGL.setColorMask(true, true);
mWaterDis.clear();
gGL.setColorMask(true, false);
@@ -9479,66 +9492,69 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLPlane plane(-pnorm, water_dist);
LLGLUserClipPlane clip_plane(plane, saved_modelview, saved_projection);
- gGL.setColorMask(true, true);
- mWaterDis.clear();
- gGL.setColorMask(true, false);
+ gGL.setColorMask(true, true);
+ mWaterDis.clear();
+ gGL.setColorMask(true, false);
// ignore clip plane if we're underwater and viewing distortion map of objects above waterline
if (camera_is_underwater)
- {
+ {
clip_plane.disable();
- }
+ }
- updateCull(camera, mRefractedObjects, water_clip, &plane);
- stateSort(camera, mRefractedObjects);
- renderGeom(camera);
+ if (reflection_detail >= WATER_REFLECT_NONE_WATER_TRANSPARENT)
+ {
+ updateCull(camera, mRefractedObjects, water_clip, &plane);
+ stateSort(camera, mRefractedObjects);
+ renderGeom(camera);
+ }
- if (LLGLSLShader::sNoFixedFunction)
- {
- gUIProgram.bind();
- }
-
- LLWorld::getInstance()->renderPropertyLines();
-
- if (LLGLSLShader::sNoFixedFunction)
- {
- gUIProgram.unbind();
- }
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
+ LLWorld::getInstance()->renderPropertyLines();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
mWaterDis.flush();
- }
+ }
LLPipeline::sDistortionRender = false;
-
+
gPipeline.popRenderTypeMask();
- }
- last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate;
+ }
+ last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate;
gPipeline.popRenderTypeMask();
LLPipeline::sUseOcclusion = occlusion;
LLPipeline::sUnderWaterRender = false;
- LLPipeline::sReflectionRender = false;
+ LLPipeline::sReflectionRender = false;
LLDrawPoolWater::sNeedsReflectionUpdate = FALSE;
LLDrawPoolWater::sNeedsDistortionUpdate = FALSE;
- if (!LLRenderTarget::sUseFBO)
- {
- glClear(GL_DEPTH_BUFFER_BIT);
- }
- glClearColor(0.f, 0.f, 0.f, 0.f);
- gViewerWindow->setup3DViewport();
-
- LLGLState::checkStates();
+ if (!LLRenderTarget::sUseFBO)
+ {
+ glClear(GL_DEPTH_BUFFER_BIT);
+ }
+ glClearColor(0.f, 0.f, 0.f, 0.f);
+ gViewerWindow->setup3DViewport();
- if (!skip_avatar_update)
- {
- gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
- }
+ LLGLState::checkStates();
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- }
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
+ }
+
+ LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
+ }
}
glh::matrix4f look(const LLVector3 pos, const LLVector3 dir, const LLVector3 up)
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 52fd51cd80..0eaa6b141d 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -414,10 +414,6 @@ public:
static void updateRenderDeferred();
static void refreshCachedSettings();
- static void throttleNewMemoryAllocation(bool disable);
-
-
-
void addDebugBlip(const LLVector3& position, const LLColor4& color);
void hidePermanentObjects( std::vector<U32>& restoreList );
@@ -600,7 +596,6 @@ public:
static bool sRenderAttachedLights;
static bool sRenderAttachedParticles;
static bool sRenderDeferred;
- static bool sMemAllocationThrottled;
static S32 sVisibleLightCount;
static F32 sMinRenderSize;
static bool sRenderingHUDs;
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index efe8102f83..7beb013fba 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -854,6 +854,9 @@
name="ColorSwatchBorderColor"
value="0.45098 0.517647 0.607843 1"/>
<color
+ name="ChatTeleportSeparatorColor"
+ reference="Black" />
+ <color
name="ChatTimestampColor"
reference="White" />
<color
@@ -963,4 +966,7 @@
<color
name="OutfitGalleryItemUnselected"
value="0.4 0.4 0.4 1" />
+ <color
+ name="AddPaymentPanel"
+ value="0.27 0.27 0.27 1" />
</colors>
diff --git a/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png
new file mode 100644
index 0000000000..048da25c92
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Landmarks.png b/indra/newview/skins/default/textures/navbar/Landmarks.png
new file mode 100644
index 0000000000..2b35de913b
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Landmarks.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index a875c4e848..03878d9fe7 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -45,6 +45,10 @@ with the same filename but different name
<texture name="AddItem_Off" file_name="icons/AddItem_Off.png" preload="false" />
<texture name="AddItem_Press" file_name="icons/AddItem_Press.png" preload="false" />
+ <texture name="add_payment_image_center" file_name="windows/add_payment_image_center.png" preload="true" />
+ <texture name="add_payment_image_left" file_name="windows/add_payment_image_left.png" preload="true" />
+ <texture name="add_payment_image_right" file_name="windows/add_payment_image_right.png" preload="true" />
+
<texture name="Arrow_Left_Off" file_name="navbar/Arrow_Left_Off.png" preload="true" />
<texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true" />
@@ -333,7 +337,11 @@ with the same filename but different name
<texture name="Inv_Unknown" file_name="icons/Inv_UnknownObject.png" preload="false" />
<texture name="Inv_VersionFolderClosed" file_name="icons/Inv_VersionFolderClosed.png" preload="false" />
<texture name="Inv_VersionFolderOpen" file_name="icons/Inv_VersionFolderOpen.png" preload="false" />
-
+
+ <texture name="Inv_Toolbar_SearchVisibility" file_name="icons/Inv_Toolbar_SearchVisibility.png" preload="false" />
+
+ <texture name="Landmarks_overlay" file_name="navbar/Landmarks.png" preload="false" />
+
<texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/>
<texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/>
@@ -649,6 +657,7 @@ with the same filename but different name
<texture name="TextField_Search_Off" file_name="widgets/TextField_Search_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
+ <texture name="TextField_Search_Highlight" file_name="widgets/TextField_Search_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" />
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png
new file mode 100644
index 0000000000..e3944289c6
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_center.png b/indra/newview/skins/default/textures/windows/add_payment_image_center.png
new file mode 100644
index 0000000000..b5459136cb
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/add_payment_image_center.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_left.png b/indra/newview/skins/default/textures/windows/add_payment_image_left.png
new file mode 100644
index 0000000000..7fb65e724a
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/add_payment_image_left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_right.png b/indra/newview/skins/default/textures/windows/add_payment_image_right.png
new file mode 100644
index 0000000000..f1937b6318
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/add_payment_image_right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/first_login_image_left.png b/indra/newview/skins/default/textures/windows/first_login_image_left.png
index 1fa10fde53..77904d7d12 100644
--- a/indra/newview/skins/default/textures/windows/first_login_image_left.png
+++ b/indra/newview/skins/default/textures/windows/first_login_image_left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/first_login_image_right.png b/indra/newview/skins/default/textures/windows/first_login_image_right.png
index d764d846b7..35ecce9c07 100644
--- a/indra/newview/skins/default/textures/windows/first_login_image_right.png
+++ b/indra/newview/skins/default/textures/windows/first_login_image_right.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml
new file mode 100644
index 0000000000..1f980564d4
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ height="405"
+ width="900"
+ layout="topleft"
+ name="floater_add_payment_method"
+ single_instance="true"
+ show_title="false"
+ legacy_header_height="0"
+ header_height="0"
+ background_visible="false"
+ can_resize="false"
+ can_drag_on_left="false"
+ can_minimize="false"
+ can_close="false">
+ <floater.string
+ name="continue_url">
+ https://secondlife.com/my/lindex/buy.php?associate_for_viewer=1
+ </floater.string>
+ <panel
+ background_opaque="false"
+ bg_alpha_color="AddPaymentPanel"
+ border_visible="false"
+ background_visible="true"
+ label="wrapper_panel"
+ layout="topleft"
+ left="0"
+ name="wrapper_panel"
+ top="0"
+ height="405"
+ width="900"
+ follows="all"
+ translate="false">
+ <text
+ type="string"
+ length="1"
+ follows="top|left|right"
+ font="SansSerifLargeBold"
+ text_color="White"
+ layout="topleft"
+ left="0"
+ height="14"
+ top_pad="30"
+ width="900"
+ halign="center"
+ name="title_txt">
+ Add a payment method to buy Linden dollars and enjoy more of Second Life.
+ </text>
+ <button
+ follows="top|left|right"
+ height="24"
+ label="Get started"
+ font="SansSerifMedium"
+ layout="topleft"
+ left="320"
+ name="continue_btn"
+ image_unselected="PushButton_Login"
+ image_pressed="PushButton_Login_Pressed"
+ image_hover_unselected="PushButton_Login_Over"
+ label_color="White"
+ top_pad ="15"
+ width="140"/>
+ <button
+ follows="top|left|right"
+ height="24"
+ label="Later"
+ layout="topleft"
+ left_pad="9"
+ name="close_btn"
+ width="90"/>
+ <icon
+ height="195"
+ width="260"
+ image_name="add_payment_image_left"
+ layout="topleft"
+ left="30"
+ name="image_left"
+ top_pad="30"
+ use_draw_context_alpha="false"/>
+ <icon
+ height="195"
+ width="260"
+ image_name="add_payment_image_center"
+ layout="topleft"
+ left_pad="30"
+ name="image_center"
+ use_draw_context_alpha="false"/>
+ <icon
+ height="195"
+ width="260"
+ image_name="add_payment_image_right"
+ layout="topleft"
+ left_pad="30"
+ name="image_right"
+ use_draw_context_alpha="false"/>
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifMedium"
+ text_color="White"
+ height="75"
+ width="260"
+ top_pad="15"
+ layout="topleft"
+ word_wrap="true"
+ left="30"
+ name="image_left_desc">
+ Create an avatar you love. Choose from millions of items in stores and the Second Life Marketplace. Your style is here.
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifMedium"
+ text_color="White"
+ height="75"
+ width="260"
+ layout="topleft"
+ word_wrap="true"
+ left_pad="30"
+ name="image_center_desc">
+ Donate to your favorite performers and hosts. Your support helps them create great experiences.
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifMedium"
+ text_color="White"
+ height="75"
+ width="260"
+ layout="topleft"
+ word_wrap="true"
+ left_pad="30"
+ name="image_right_desc">
+ Make the home of your dreams. With millions of items available to purchase, you can make your retreat unique.
+ </text>
+ </panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml
index 59589e3665..f4a686bae1 100644
--- a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml
+++ b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml
@@ -5,14 +5,14 @@
save_rect="false"
title="Personal Lighting"
width="845"
- height="240"
+ height="280"
min_width="500"
- min_height="235"
+ min_height="275"
single_instance="true"
can_resize="false">
<layout_stack name="outer_stack"
width="845"
- height="230"
+ height="275"
follows="all"
animate="false"
top="0"
@@ -276,19 +276,57 @@
height="150"
width="150"
thumb_mode="sun"/>
+ <text follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="0"
+ top_pad="5"
+ width="200">Azimuth:</text>
+ <slider decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="0"
+ max_val="359.99"
+ name="sun_azimuth"
+ top_pad="5"
+ width="130"
+ can_edit_text="true"/>
+ <text follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-5"
+ top_pad="5"
+ width="200">Elevation:</text>
+ <slider decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="-90"
+ max_val="90"
+ name="sun_elevation"
+ top_pad="5"
+ width="130"
+ can_edit_text="true"/>
<check_box control_name="sunbeacon"
width="60"
height="16"
label="Show Beacon"
layout="topleft"
name="sunbeacon"
- left_delta="55"
- bottom="-20"
- follows="bottom|right"/>
+ left_delta="-5"
+ top_pad="8"
+ follows="left|top"/>
<text follows="left|top"
height="10"
layout="topleft"
- left_pad="40"
+ left_pad="95"
top="25"
width="80">Scale:</text>
<slider decimal_digits="2"
@@ -385,15 +423,53 @@
height="150"
width="150"
thumb_mode="moon"/>
+ <text follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="0"
+ top_pad="5"
+ width="200">Azimuth:</text>
+ <slider decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="0"
+ max_val="359.99"
+ name="moon_azimuth"
+ top_pad="5"
+ width="130"
+ can_edit_text="true"/>
+ <text follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-5"
+ top_pad="5"
+ width="200">Elevation:</text>
+ <slider decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="-90"
+ max_val="90"
+ name="moon_elevation"
+ top_pad="5"
+ width="130"
+ can_edit_text="true"/>
<check_box control_name="moonbeacon"
+ follows="left|top"
width="60"
height="16"
label="Show Beacon"
layout="topleft"
name="moonbeacon"
- right="-50"
- bottom="-20"
- follows="bottom|right"/>
+ left_delta="0"
+ top_pad="8"/>
</layout_panel>
</layout_stack>
</layout_panel>
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index 92c5d8bcbe..3df2683ca8 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -14,7 +14,7 @@
help_topic="avatar"
save_rect="true"
save_visibility="true"
- title="CHOOSE AN AVATAR"
+ title="COMPLETE AVATARS"
width="700">
<web_browser
top="25"
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 061af1b67c..e8e83301be 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<floater
- legacy_header_height="18"
+
can_minimize="false"
- height="275"
+ height="285"
layout="topleft"
title="BUY L$"
name="buy currency"
@@ -17,277 +17,385 @@
name="info_cannot_buy">
Unable to Buy
</floater.string>
+ <floater.string
+ name="estimated_zero">
+ US$ 0.00
+ </floater.string>
<icon
- height="215"
+ height="245"
image_name="Linden_Dollar_Background"
layout="topleft"
left="0"
name="normal_background"
- top="17"
+ top="0"
use_draw_context_alpha="false"
width="350" />
- <text
- type="string"
- length="1"
- follows="top|left|right"
- font="SansSerifHuge"
- layout="topleft"
- left="20"
- height="30"
- top="25"
- width="340"
- name="info_need_more">
- You need more L$
- </text>
- <text
- type="string"
- length="1"
- follows="top|left"
- height="16"
+ <layout_stack
+ animate="false"
+ name="outer_stack"
+ layout="topleft"
+ follows="all"
+ orientation="vertical"
+ left="0"
+ top="0"
+ width="350"
+ height="285">
+ <layout_panel
+ auto_resize="false"
+ name="layout_panel_title"
layout="topleft"
- top="246"
- left="15"
- width="300"
- name="contacting">
- Contacting LindeX...
- </text>
- <text
- type="string"
- length="1"
- follows="top|left"
- font="SansSerifHuge"
+ follows="all"
+ width="350"
+ height="35">
+ <text
+ type="string"
+ length="1"
+ follows="top|left|right"
+ font="SansSerifLarge"
+ layout="topleft"
+ left="20"
+ height="30"
+ top="8"
+ width="340"
+ name="info_need_more">
+ You need more L$
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="top|left|right"
+ font="SansSerifLarge"
+ layout="topleft"
+ left="20"
+ height="30"
+ top="8"
+ width="300"
+ name="info_buying">
+ Buy L$
+ </text>
+ <view_border
+ bevel_style="none"
+ height="0"
+ layout="topleft"
+ left="20"
+ name="text_border"
+ top_delta="25"
+ width="300"/>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ name="layout_panel_price"
layout="topleft"
- left="20"
- height="30"
- top="25"
- width="300"
- name="info_buying">
- Buy L$
- </text>
- <text
- type="string"
- length="1"
- follows="top|left"
- font="SansSerifMedium"
- height="16"
+ follows="all"
+ width="350"
+ height="18">
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifMedium"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="target_price_label"
+ top_pad="3"
+ width="210">
+ You need
+ </text>
+ <text
+ type="string"
+ length="1"
+ font="SansSerifMedium"
+ follows="top|left"
+ halign="right"
+ height="16"
+ layout="topleft"
+ left="200"
+ name="target_price"
+ top_delta="0"
+ width="120">
+ L$ [AMT]
+ </text>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ name="layout_panel_balance"
layout="topleft"
- left="20"
- name="balance_label"
- top="65"
- width="210">
- I have
- </text>
- <text
- type="string"
- length="1"
- font="SansSerifMedium"
- follows="top|left"
- halign="right"
- height="16"
- layout="topleft"
- left="200"
- name="balance_amount"
- top_delta="0"
- width="120">
+ follows="all"
+ width="350"
+ height="19">
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifMedium"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="balance_label"
+ top_pad="5"
+ width="210">
+ You now have
+ </text>
+ <text
+ type="string"
+ length="1"
+ font="SansSerifMedium"
+ follows="top|left"
+ halign="right"
+ height="16"
+ layout="topleft"
+ left="200"
+ name="balance_amount"
+ top_delta="0"
+ width="120">
L$ [AMT]
- </text>
- <text
- type="string"
- length="1"
- follows="top|left"
- font="SansSerifMedium"
- height="16"
- top="95"
- layout="topleft"
- left="20"
- name="currency_action"
- width="210">
- I want to buy
- </text>
- <text
- font="SansSerifMedium"
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- top_delta="0"
- left="217"
- name="currency_label"
- width="15">
- L$
- </text>
- <line_editor
- type="string"
- max_length_bytes="10"
- halign="right"
- font="SansSerifMedium"
- select_on_focus="true"
- follows="top|left"
- top_delta="-7"
- height="22"
- label="L$"
- left_pad="3"
- name="currency_amt"
- width="85">
- 1234
- </line_editor>
- <text
- type="string"
- font="SansSerifMedium"
- length="1"
- follows="top|left"
- height="16"
- layout="topleft"
- left="20"
- top="125"
- name="buying_label"
- width="210">
- For the price
- </text>
- <text
- type="string"
- length="1"
- font="SansSerifMedium"
- text_color="EmphasisColor"
- follows="top|left"
- halign="right"
- height="16"
- top_delta="0"
+ </text>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ name="layout_panel_required"
layout="topleft"
- left="150"
- name="currency_est"
- width="170">
- approx. [LOCALAMOUNT]
- </text>
- <text
- type="string"
- font="SansSerifSmall"
- text_color="EmphasisColor"
- length="1"
- follows="top|left"
- height="16"
- layout="topleft"
- top="125"
- left="170"
- width="150"
- halign="right"
- name="getting_data">
- Estimating...
- </text>
- <text
- type="string"
- font="SansSerifSmall"
- top="145"
- length="1"
- follows="top|left"
- height="16"
- halign="right"
- left="20"
- width="300"
- layout="topleft"
- name="buy_action">
- [ACTION]
- </text>
- <text
- type="string"
- font="SansSerifMedium"
- length="1"
- follows="top|left"
- height="16"
- layout="topleft"
- left="20"
- name="total_label"
- top="165"
- width="210">
- My new balance will be
- </text>
- <text
- type="string"
- length="1"
- font="SansSerifMedium"
- follows="top|left"
- top_delta="0"
- height="16"
- layout="topleft"
- left="200"
- halign="right"
- name="total_amount"
- width="120">
+ follows="all"
+ width="350"
+ height="22">
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifMedium"
+ font.style="BOLD"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="required_label"
+ top_pad="6"
+ width="210">
+ You should buy at least
+ </text>
+ <text
+ type="string"
+ length="1"
+ font="SansSerifMedium"
+ follows="top|left"
+ halign="right"
+ height="16"
+ layout="topleft"
+ left="200"
+ name="required_amount"
+ top_delta="0"
+ width="120">
L$ [AMT]
- </text>
- <text
- type="string"
- length="1"
- text_color="LtGray_50"
- follows="top|left"
+ </text>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ name="layout_panel_action"
layout="topleft"
- halign="right"
- top="189"
- left="20"
- width="300"
- height="30"
- name="currency_links">
- [http://www.secondlife.com/my/account/payment_method_management.php payment method] | [http://www.secondlife.com/my/account/currency.php currency]
- </text>
- <text
- type="string"
- length="1"
- text_color="LtGray_50"
- follows="top|left"
+ follows="all"
+ width="350"
+ height="90">
+ <view_border
+ bevel_style="none"
+ height="0"
+ layout="topleft"
+ left="20"
+ name="text_border_2"
+ top_pad="5"
+ width="300"/>
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifMedium"
+ height="16"
+ top_pad="15"
+ layout="topleft"
+ left="20"
+ name="currency_action"
+ width="210">
+ Choose amount to buy
+ </text>
+ <text
+ font="SansSerifMedium"
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ top_delta="0"
+ left="247"
+ name="currency_label"
+ width="15">
+ L$
+ </text>
+ <line_editor
+ type="string"
+ max_length_bytes="10"
+ halign="right"
+ font="SansSerifMedium"
+ select_on_focus="true"
+ follows="top|left"
+ top_delta="-4"
+ height="22"
+ label="L$"
+ left_pad="3"
+ name="currency_amt"
+ width="55">
+ 1234
+ </line_editor>
+ <text
+ type="string"
+ length="1"
+ font="SansSerifMedium"
+ text_color="EmphasisColor"
+ follows="top|left"
+ halign="right"
+ height="16"
+ top_pad="4"
+ layout="topleft"
+ left="150"
+ name="currency_est"
+ width="170">
+ Approx. [LOCALAMOUNT]
+ </text>
+ <text
+ type="string"
+ font="SansSerifSmall"
+ text_color="EmphasisColor"
+ length="1"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ left="170"
+ top_delta="0"
+ width="150"
+ halign="right"
+ name="getting_data">
+ Estimating...
+ </text>
+ <text
+ type="string"
+ font="SansSerifMedium"
+ length="1"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="total_label"
+ top_pad="10"
+ width="210">
+ Your new balance will be
+ </text>
+ <text
+ type="string"
+ length="1"
+ font="SansSerifMedium"
+ follows="top|left"
+ top_delta="0"
+ height="16"
+ layout="topleft"
+ left="200"
+ halign="right"
+ name="total_amount"
+ width="120">
+ L$ [AMT]
+ </text>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ name="layout_panel_msg"
layout="topleft"
- halign="right"
- top="202"
- left="20"
- width="300"
- height="30"
- name="exchange_rate_note">
+ follows="all"
+ width="350"
+ height="50">
+ <view_border
+ bevel_style="none"
+ height="0"
+ layout="topleft"
+ left="20"
+ name="text_border_3"
+ top_pad="0"
+ width="300"/>
+ <text
+ type="string"
+ length="1"
+ text_color="LtGray_50"
+ follows="top|left"
+ layout="topleft"
+ halign="right"
+ top_pad="3"
+ left="20"
+ width="300"
+ height="30"
+ name="currency_links">
+ [http://www.secondlife.com/my/account/payment_method_management.php payment method] | [http://www.secondlife.com/my/account/currency.php currency]
+ </text>
+ <text
+ type="string"
+ length="1"
+ text_color="LtGray_50"
+ follows="top|left"
+ layout="topleft"
+ halign="right"
+ top="19"
+ left="20"
+ width="300"
+ height="30"
+ name="exchange_rate_note">
Re-enter amount to see the latest exchange rate.
- </text>
- <text
- type="string"
- length="1"
- text_color="LtGray_50"
- follows="top|left"
- layout="topleft"
- halign="right"
- top="208"
- left="10"
- width="310"
- height="35"
- name="purchase_warning_repurchase">
- Confirming this purchase only buys L$, not the object.
- </text>
- <text
- type="string"
- length="1"
- text_color="LtGray_50"
- follows="top|left"
- layout="topleft"
- halign="right"
- top="213"
- left="20"
- width="300"
- height="30"
- name="purchase_warning_notenough">
- You aren&apos;t buying enough L$. Please increase the amount.
- </text>
-
- <button
- follows="bottom|left"
- height="20"
- label="Buy Now"
- layout="topleft"
- left="151"
- name="buy_btn"
- top="242"
- width="90"/>
- <button
- follows="bottom|right"
- height="20"
- label="Cancel"
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerifMedium"
+ top="10"
+ left="20"
+ width="310"
+ height="35"
+ name="purchase_warning_repurchase">
+After you receive your L$, you should try your
+purchase again.
+ </text>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ name="layout_panel_buttons"
layout="topleft"
- left_pad="10"
- name="cancel_btn"
- width="90"/>
+ follows="all"
+ width="350"
+ height="40">
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ top_pad="0"
+ left="15"
+ width="300"
+ name="contacting">
+ Contacting LindeX...
+ </text>
+ <button
+ follows="top|left|right"
+ height="20"
+ label="Buy L$ now"
+ layout="topleft"
+ left="151"
+ name="buy_btn"
+ bottom_delta ="8"
+ width="90"/>
+ <button
+ follows="top|left|right"
+ height="20"
+ label="Cancel"
+ layout="topleft"
+ left_pad="10"
+ name="cancel_btn"
+ width="90"/>
+ </layout_panel>
+ </layout_stack>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_create_landmark.xml b/indra/newview/skins/default/xui/en/floater_create_landmark.xml
new file mode 100644
index 0000000000..dcedaceaeb
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_create_landmark.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ can_resize="false"
+ show_title="false"
+ can_minimize="false"
+ can_close="false"
+ header_height="10"
+ bg_opaque_image="Window_NoTitle_Foreground"
+ bg_alpha_image="Window_NoTitle_Background"
+ height="305"
+ layout="topleft"
+ name="create_landmark"
+ width="330">
+ <string name="favorites_bar">
+ Favorites bar
+ </string>
+ <text
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left="20"
+ name="title_label"
+ top="5"
+ font="SansSerifLargeBold"
+ value="Landmark added"
+ width="290" />
+ <text
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left="20"
+ name="name_label"
+ top_pad="10"
+ value="Name"
+ width="290" />
+ <line_editor
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ max_length_bytes="63"
+ name="title_editor"
+ prevalidate_callback="ascii"
+ text_readonly_color="white"
+ top_pad="5"
+ width="290" />
+ <text
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ name="folder_label"
+ top_pad="10"
+ value="Landmark location:"
+ width="290" />
+ <combo_box
+ follows="bottom|left"
+ height="23"
+ layout="topleft"
+ name="folder_combo"
+ top_pad="2"
+ width="290" />
+ <text
+ follows="left|top"
+ layout="topleft"
+ top_pad="6"
+ left="20"
+ name="new_folder_textbox"
+ height="20"
+ parse_urls="true"
+ skip_link_underline="true"
+ wrap="true">
+ [secondlife:/// Create new folder]
+ </text>
+ <text
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ name="notes_label"
+ top_pad="10"
+ value="My notes"
+ width="290" />
+ <text_editor
+ bg_readonly_color="DkGray0"
+ follows="all"
+ height="75"
+ layout="topleft"
+ max_length="127"
+ name="notes_editor"
+ spellcheck="true"
+ text_readonly_color="white"
+ text_type="ascii_with_newline"
+ top_pad="5"
+ width="290"
+ wrap="true" />
+ <button
+ follows="bottom|left|right"
+ height="23"
+ label="OK"
+ layout="topleft"
+ mouse_opaque="false"
+ name="ok_btn"
+ top_pad="10"
+ left="19"
+ width="140" />
+ <button
+ follows="bottom|left|right"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="12"
+ mouse_opaque="false"
+ name="cancel_btn"
+ width="140" />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index 30e9002230..c609e3bd3a 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -616,7 +616,7 @@
follows="top|left"
height="23"
label="Save"
- left="5"
+ left="200"
top_pad="0"
name="save_btn"
width="156" />
diff --git a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
index dbf91b0834..a6e20880a9 100644
--- a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
+++ b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
@@ -89,7 +89,7 @@
follows="left|top|right|bottom"
auto_resize="false"
user_resize="false"
- height="40"
+ height="29"
visible="true">
<layout_stack
follows="bottom|left|right"
@@ -97,7 +97,7 @@
layout="topleft"
mouse_opaque="false"
name="button_bar_ls"
- left="0"
+ left="212"
orientation="horizontal"
top="0"
width="313">
diff --git a/indra/newview/skins/default/xui/en/floater_how_to.xml b/indra/newview/skins/default/xui/en/floater_how_to.xml
index 8c0077a8cc..baff8e1bc0 100644
--- a/indra/newview/skins/default/xui/en/floater_how_to.xml
+++ b/indra/newview/skins/default/xui/en/floater_how_to.xml
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- can_resize="true"
- can_minimize="true"
- height="775"
+ can_resize="false"
+ can_minimize="false"
+ can_close="false"
+ height="525"
layout="topleft"
- min_height="360"
- left="10000"
- top="10"
- min_width="335"
name="floater_how_to"
- help_topic="how_to"
single_instance="true"
+ save_visibility="true"
save_rect="true"
- title="HOW TO"
- width="780"
+ title="WELCOME ISLAND GUIDEBOOK"
+ width="310"
+ rel_x="-0.469309"
+ rel_y="-0.011166"
filename="floater_web_content.xml"/> \ No newline at end of file
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 02a21764ce..7f863756eb 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -1362,7 +1362,7 @@
top_pad="9"
left="6"
width="70"
- label="Enable detailed logging"
+ label="Enable detailed logging (can be very slow)"
name="verbose_logging"/>
</panel>
</tab_container>
diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
index fdea7a821a..35ad87ceb0 100644
--- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
@@ -11,7 +11,7 @@
save_rect="true"
single_instance="true"
reuse_instance="true"
- title="APPEARANCE"
+ title="AVATAR"
min_height="440"
min_width="333"
width="333">
diff --git a/indra/newview/skins/default/xui/en/floater_my_scripts.xml b/indra/newview/skins/default/xui/en/floater_my_scripts.xml
index 3b0b6723c7..ee6defce9d 100644
--- a/indra/newview/skins/default/xui/en/floater_my_scripts.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_scripts.xml
@@ -7,7 +7,7 @@
layout="topleft"
name="myscripts"
save_rect="true"
- title="My Scripts"
+ title="ATTACHMENT SCRIPTS"
min_width="620"
width="620">
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index e282f1b179..3cc99b28c9 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -724,6 +724,14 @@
name="Reflections"
width="150">
<combo_box.item
+ label="None; opaque"
+ name="0"
+ value="-2"/>
+ <combo_box.item
+ label="None; transparent"
+ name="0"
+ value="-1"/>
+ <combo_box.item
label="Minimal"
name="0"
value="0"/>
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index 38f4b7715f..7ad692038e 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -173,16 +173,13 @@
parameter="avatar_render_settings" />
</menu_item_call>
</context_menu>
- <menu_item_separator
- layout="topleft" name="Impostor seperator"/>
-
<menu_item_call
enabled="false"
label="Block Particle Owner"
name="Mute Particle">
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index 59faf6a9f5..26b1c86c53 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -4,28 +4,7 @@
name="Attachment Pie">
<menu_item_call
enabled="false"
- label="Touch"
- layout="topleft"
- name="Attachment Object Touch">
- <menu_item_call.on_click
- function="Object.Touch" />
- <menu_item_call.on_enable
- function="Object.EnableTouch"
- name="EnableTouch"/>
- </menu_item_call>
- <!--menu_item_call
- label="Stand Up"
- layout="topleft"
- name="Stand Up">
- <menu_item_call.on_click
- function="Self.StandUp"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableStandUp" />
- </menu_item_call-->
- <menu_item_call
- enabled="false"
- label="Edit"
+ label="Edit item"
layout="topleft"
name="Edit...">
<menu_item_call.on_click
@@ -35,7 +14,7 @@
</menu_item_call>
<menu_item_call
enabled="false"
- label="Detach"
+ label="Detach item"
layout="topleft"
name="Detach">
<menu_item_call.on_click
@@ -43,98 +22,278 @@
<menu_item_call.on_enable
function="Attachment.EnableDetach" />
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
-
<menu_item_call
- label="Sit Down"
+ enabled="false"
+ label="Touch item"
layout="topleft"
- name="Sit Down Here">
+ name="Attachment Object Touch">
<menu_item_call.on_click
- function="Self.SitDown"
- parameter="" />
+ function="Object.Touch" />
<menu_item_call.on_enable
- function="Self.EnableSitDown" />
+ function="Object.EnableTouch"
+ name="EnableTouch"/>
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
<menu_item_call
-label="Stand Up"
-layout="topleft"
-name="Stand Up">
+ label="Now wearing..."
+ name="NowWearing">
<menu_item_call.on_click
- function="Self.StandUp"
- parameter="" />
+ function="NowWearing" />
<menu_item_call.on_enable
- function="Self.EnableStandUp" />
+ function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
<menu_item_call
- label="My Appearance"
+ label="My Outfits..."
name="Change Outfit">
<menu_item_call.on_click
function="CustomizeAvatar" />
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Edit My Outfit"
-layout="topleft"
-name="Edit Outfit">
+ <menu_item_call label="Hover height..."
+ layout="topleft"
+ name="Hover Height">
<menu_item_call.on_click
- function="EditOutfit" />
+ function="HoverHeight" />
<menu_item_call.on_enable
- function="Edit.EnableCustomizeAvatar" />
+ function="Edit.EnableHoverHeight" />
</menu_item_call>
- <menu_item_call label="Edit My Shape"
+ <menu_item_call label="Shape..."
layout="topleft"
- name="Edit My Shape">
+ name="Edit Shape">
<menu_item_call.on_click
function="EditShape" />
<menu_item_call.on_enable
function="Edit.EnableEditShape" />
</menu_item_call>
- <menu_item_call label="Hover Height"
- layout="topleft"
- name="Hover Height">
- <menu_item_call.on_click
- function="HoverHeight" />
- <menu_item_call.on_enable
- function="Edit.EnableHoverHeight" />
+ <menu_item_call label="Edit outfit parts..."
+ layout="topleft"
+ name="Edit Outfit">
+ <menu_item_call.on_click
+ function="EditOutfit" />
+ <menu_item_call.on_enable
+ function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Reset Skeleton"
+ <context_menu
+ label="Take off"
+ layout="topleft"
+ name="Take Off &gt;">
+ <context_menu
+ label="Clothes"
+ layout="topleft"
+ name="Clothes &gt;">
+ <menu_item_call
+ enabled="false"
+ label="Shirt"
layout="topleft"
- name="Reset Skeleton">
- <menu_item_call.on_click
- function="Avatar.ResetSkeleton" />
- </menu_item_call>
- <menu_item_call label="Reset Skeleton And Animations"
+ name="Shirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Pants"
layout="topleft"
- name="Reset Skeleton And Animations">
- <menu_item_call.on_click
- function="Avatar.ResetSkeletonAndAnimations" />
- </menu_item_call>
-
+ name="Pants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="pants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Skirt"
+ layout="topleft"
+ name="Skirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="skirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Shoes"
+ layout="topleft"
+ name="Shoes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shoes" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Socks"
+ layout="topleft"
+ name="Socks">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="socks" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Jacket"
+ layout="topleft"
+ name="Jacket">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="jacket" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Gloves"
+ layout="topleft"
+ name="Gloves">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="gloves" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Undershirt"
+ layout="topleft"
+ name="Self Undershirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="undershirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Underpants"
+ layout="topleft"
+ name="Self Underpants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="underpants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Tattoo"
+ layout="topleft"
+ name="Self Tattoo">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="tattoo" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Physics"
+ layout="topleft"
+ name="Self Physics">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="physics" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="physics" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Alpha"
+ layout="topleft"
+ name="Self Alpha">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="alpha" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="All Clothes"
+ layout="topleft"
+ name="All Clothes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="all" />
+ </menu_item_call>
+ </context_menu>
+ <context_menu
+ label="HUD"
+ layout="topleft"
+ name="Detach Self HUD" />
+ <context_menu
+ label="Detach"
+ layout="topleft"
+ name="Detach Self" />
+ <menu_item_call
+ label="Detach All"
+ layout="topleft"
+ name="Detach All">
+ <menu_item_call.on_click
+ function="Self.RemoveAllAttachments"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableRemoveAllAttachments" />
+ </menu_item_call>
+ </context_menu>
+ <menu_item_separator/>
<menu_item_call
- label="My Friends"
+ label="Sit / stand"
layout="topleft"
- name="Friends...">
+ name="Sit stand">
<menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="friends_panel" />
+ function="Self.ToggleSitStand"/>
+ <menu_item_call.on_enable
+ function="Self.EnableSitStand" />
</menu_item_call>
<menu_item_call
- label="My Groups"
- layout="topleft"
- name="Groups...">
+ label="Fly / land"
+ name="Fly land">
<menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="groups_panel" />
+ function="Agent.toggleFlying" />
+ <menu_item_call.on_enable
+ function="Agent.enableFlyLand" />
</menu_item_call>
<menu_item_call
- label="My Profile"
- layout="topleft"
- name="Profile...">
+ label="Stop animations"
+ name="Stop Animating My Avatar">
<menu_item_call.on_click
- function="ShowAgentProfile"
- parameter="agent" />
+ function="Tools.StopAllAnimations" />
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call label="Reset skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
+ <menu_item_call label="Reset skeleton and animations"
+ layout="topleft"
+ name="Reset Skeleton And Animations">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeletonAndAnimations" />
</menu_item_call>
<menu_item_call
label="Debug Textures"
@@ -152,27 +311,27 @@ name="Edit Outfit">
<menu_item_call.on_visible
function="Advanced.EnableAppearanceToXML"/>
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
- <menu_item_call
- enabled="false"
- label="Drop"
- layout="topleft"
- name="Drop">
- <menu_item_call.on_click
- function="Attachment.Drop" />
- <menu_item_call.on_enable
- function="Attachment.EnableDrop" />
- </menu_item_call>
- <menu_item_separator
- layout="topleft" />
<menu_item_call
enabled="false"
label="Block Particle Owner"
name="Mute Particle">
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
+
+ <menu_item_separator
+ layout="topleft" />
+
+ <menu_item_call
+ enabled="false"
+ label="Drop item"
+ layout="topleft"
+ name="Drop">
+ <menu_item_call.on_click
+ function="Attachment.Drop" />
+ <menu_item_call.on_enable
+ function="Attachment.EnableDrop" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index f9fb847910..acbb9b860d 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -165,16 +165,13 @@
</menu_item_call>
</context_menu>
- <menu_item_separator
- layout="topleft" name="Impostor seperator"/>
-
<menu_item_call
enabled="false"
label="Block Particle Owner"
name="Mute Particle">
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index 9e181d0b6d..500b6fffc2 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -3,209 +3,16 @@
layout="topleft"
name="Self Pie">
<menu_item_call
- label="Sit Down"
+ label="Now wearing..."
layout="topleft"
- name="Sit Down Here">
+ name="NowWearing">
<menu_item_call.on_click
- function="Self.SitDown"
- parameter="" />
+ function="NowWearing" />
<menu_item_call.on_enable
- function="Self.EnableSitDown" />
+ function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
<menu_item_call
- label="Stand Up"
- layout="topleft"
- name="Stand Up">
- <menu_item_call.on_click
- function="Self.StandUp"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableStandUp" />
- </menu_item_call>
- <context_menu
- label="Take Off"
- layout="topleft"
- name="Take Off &gt;">
- <context_menu
- label="Clothes"
- layout="topleft"
- name="Clothes &gt;">
- <menu_item_call
- enabled="false"
- label="Shirt"
- layout="topleft"
- name="Shirt">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="shirt" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="shirt" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Pants"
- layout="topleft"
- name="Pants">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="pants" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="pants" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Skirt"
- layout="topleft"
- name="Skirt">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="skirt" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="skirt" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Shoes"
- layout="topleft"
- name="Shoes">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="shoes" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="shoes" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Socks"
- layout="topleft"
- name="Socks">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="socks" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="socks" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Jacket"
- layout="topleft"
- name="Jacket">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="jacket" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="jacket" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Gloves"
- layout="topleft"
- name="Gloves">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="gloves" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="gloves" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Undershirt"
- layout="topleft"
- name="Self Undershirt">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="undershirt" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="undershirt" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Underpants"
- layout="topleft"
- name="Self Underpants">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="underpants" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="underpants" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Tattoo"
- layout="topleft"
- name="Self Tattoo">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="tattoo" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="tattoo" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Physics"
- layout="topleft"
- name="Self Physics">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="physics" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="physics" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Alpha"
- layout="topleft"
- name="Self Alpha">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="alpha" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="alpha" />
- </menu_item_call>
- <menu_item_separator
- layout="topleft" />
- <menu_item_call
- label="All Clothes"
- layout="topleft"
- name="All Clothes">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="all" />
- </menu_item_call>
- </context_menu>
- <context_menu
- label="HUD"
- layout="topleft"
- name="Object Detach HUD" />
- <context_menu
- label="Detach"
- layout="topleft"
- name="Object Detach" />
- <menu_item_call
- label="Detach All"
- layout="topleft"
- name="Detach All">
- <menu_item_call.on_click
- function="Self.RemoveAllAttachments"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableRemoveAllAttachments" />
- </menu_item_call>
- </context_menu>
- <menu_item_call
- label="My Appearance"
+ label="My Outfits..."
layout="topleft"
name="Chenge Outfit">
<menu_item_call.on_click
@@ -213,66 +20,250 @@
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Edit My Outfit"
- layout="topleft"
- name="Edit Outfit">
- <menu_item_call.on_click
- function="EditOutfit" />
- <menu_item_call.on_enable
- function="Edit.EnableCustomizeAvatar" />
+ <menu_item_call label="Hover height..."
+ layout="topleft"
+ name="Hover Height">
+ <menu_item_call.on_click
+ function="HoverHeight" />
+ <menu_item_call.on_enable
+ function="Edit.EnableHoverHeight" />
</menu_item_call>
- <menu_item_call label="Edit My Shape"
+ <menu_item_call label="Shape..."
layout="topleft"
- name="Edit My Shape">
+ name="Edit Shape">
<menu_item_call.on_click
function="EditShape" />
<menu_item_call.on_enable
function="Edit.EnableEditShape" />
</menu_item_call>
- <menu_item_call label="Hover Height"
- layout="topleft"
- name="Hover Height">
- <menu_item_call.on_click
- function="HoverHeight" />
- <menu_item_call.on_enable
- function="Edit.EnableHoverHeight" />
+ <menu_item_call
+ label="Edit outfit parts..."
+ layout="topleft"
+ name="Edit Outfit">
+ <menu_item_call.on_click
+ function="EditOutfit" />
+ <menu_item_call.on_enable
+ function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Reset Skeleton"
+ <context_menu
+ label="Take off"
+ layout="topleft"
+ name="Take Off &gt;">
+ <context_menu
+ label="Clothes"
+ layout="topleft"
+ name="Clothes &gt;">
+ <menu_item_call
+ enabled="false"
+ label="Shirt"
+ layout="topleft"
+ name="Shirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Pants"
+ layout="topleft"
+ name="Pants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="pants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Skirt"
+ layout="topleft"
+ name="Skirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="skirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Shoes"
+ layout="topleft"
+ name="Shoes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shoes" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Socks"
+ layout="topleft"
+ name="Socks">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="socks" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Jacket"
+ layout="topleft"
+ name="Jacket">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="jacket" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Gloves"
+ layout="topleft"
+ name="Gloves">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="gloves" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Undershirt"
+ layout="topleft"
+ name="Self Undershirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="undershirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Underpants"
+ layout="topleft"
+ name="Self Underpants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="underpants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Tattoo"
+ layout="topleft"
+ name="Self Tattoo">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="tattoo" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Physics"
+ layout="topleft"
+ name="Self Physics">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="physics" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="physics" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Alpha"
+ layout="topleft"
+ name="Self Alpha">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="alpha" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="All Clothes"
+ layout="topleft"
+ name="All Clothes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="all" />
+ </menu_item_call>
+ </context_menu>
+ <context_menu
+ label="HUD"
+ layout="topleft"
+ name="Object Detach HUD" />
+ <context_menu
+ label="Detach"
+ layout="topleft"
+ name="Object Detach" />
+ <menu_item_call
+ label="Detach All"
+ layout="topleft"
+ name="Detach All">
+ <menu_item_call.on_click
+ function="Self.RemoveAllAttachments"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableRemoveAllAttachments" />
+ </menu_item_call>
+ </context_menu>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Sit / stand"
+ layout="topleft"
+ name="Sit stand">
+ <menu_item_call.on_click
+ function="Self.ToggleSitStand"/>
+ <menu_item_call.on_enable
+ function="Self.EnableSitStand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Fly / land"
+ name="Fly land">
+ <menu_item_call.on_click
+ function="Agent.toggleFlying" />
+ <menu_item_call.on_enable
+ function="Agent.enableFlyLand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Stop animations"
+ name="Stop Animating My Avatar">
+ <menu_item_call.on_click
+ function="Tools.StopAllAnimations" />
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call label="Reset skeleton"
layout="topleft"
name="Reset Skeleton">
<menu_item_call.on_click
function="Avatar.ResetSkeleton" />
- </menu_item_call>
- <menu_item_call label="Reset Skeleton And Animations"
+ </menu_item_call>
+ <menu_item_call label="Reset skeleton and animations"
layout="topleft"
name="Reset Skeleton And Animations">
<menu_item_call.on_click
function="Avatar.ResetSkeletonAndAnimations" />
</menu_item_call>
- <menu_item_call
- label="My Friends"
- layout="topleft"
- name="Friends...">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="friends_panel" />
- </menu_item_call>
- <menu_item_call
- label="My Groups"
- layout="topleft"
- name="Groups...">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="groups_panel" />
- </menu_item_call>
- <menu_item_call
- label="My Profile"
- layout="topleft"
- name="Profile...">
- <menu_item_call.on_click
- function="ShowAgentProfile"
- parameter="agent" />
- </menu_item_call>
<menu_item_call
label="Debug Textures"
name="Debug...">
@@ -289,8 +280,6 @@
<menu_item_call.on_visible
function="Advanced.EnableAppearanceToXML"/>
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
<menu_item_call
enabled="false"
label="Block Particle Owner"
@@ -298,7 +287,7 @@
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_favorites.xml b/indra/newview/skins/default/xui/en/menu_favorites.xml
index be380e11e5..0eab7c451b 100644
--- a/indra/newview/skins/default/xui/en/menu_favorites.xml
+++ b/indra/newview/skins/default/xui/en/menu_favorites.xml
@@ -21,12 +21,12 @@
parameter="about" />
</menu_item_call>
<menu_item_call
- label="Copy SLurl"
+ label="Move to Landmarks"
layout="topleft"
- name="Copy slurl">
+ name="Move to Landmarks">
<menu_item_call.on_click
function="Favorites.DoToSelected"
- parameter="copy_slurl" />
+ parameter="move_to_landmarks" />
</menu_item_call>
<menu_item_call
label="Show on Map"
@@ -36,6 +36,25 @@
function="Favorites.DoToSelected"
parameter="show_on_map" />
</menu_item_call>
+ <menu_item_call
+ label="Copy SLurl"
+ layout="topleft"
+ name="Copy slurl">
+ <menu_item_call.on_click
+ function="Favorites.DoToSelected"
+ parameter="copy_slurl" />
+ </menu_item_call>
+ <menu_item_call
+ label="Create Pick"
+ layout="topleft"
+ name="create_pick">
+ <menu_item_call.on_click
+ function="Favorites.DoToSelected"
+ parameter="create_pick" />
+ <menu_item_call.on_enable
+ function="Favorites.EnableSelected"
+ parameter="create_pick" />
+ </menu_item_call>
<menu_item_separator
layout="topleft" />
@@ -59,10 +78,14 @@
function="Favorites.EnableSelected"
parameter="can_paste" />
</menu_item_call>
-
- <menu_item_separator
- layout="topleft" />
-
+ <menu_item_call
+ label="Rename"
+ layout="topleft"
+ name="rename">
+ <menu_item_call.on_click
+ function="Favorites.DoToSelected"
+ parameter="rename" />
+ </menu_item_call>
<menu_item_call
label="Delete"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml
new file mode 100644
index 0000000000..46193f4a7a
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ bottom="806"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="menu_search_visibility"
+ visible="false">
+ <menu_item_check
+ label="Search Trash"
+ layout="topleft"
+ name="search_trash">
+ <on_click
+ function="Inventory.GearDefault.Custom.Action"
+ parameter="toggle_search_trash" />
+ <on_check
+ function="Inventory.GearDefault.Check"
+ parameter="toggle_search_trash" />
+ </menu_item_check>
+ <menu_item_check
+ label="Search Library"
+ layout="topleft"
+ name="search_library">
+ <on_click
+ function="Inventory.GearDefault.Custom.Action"
+ parameter="toggle_search_library" />
+ <on_check
+ function="Inventory.GearDefault.Check"
+ parameter="toggle_search_library" />
+ </menu_item_check>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_check
+ label="Include links"
+ layout="topleft"
+ name="include_links">
+ <on_click
+ function="Inventory.GearDefault.Custom.Action"
+ parameter="include_links" />
+ <on_check
+ function="Inventory.GearDefault.Check"
+ parameter="include_links" />
+ </menu_item_check>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index 07b3cc3bd8..96fac1c6e8 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -57,20 +57,13 @@
tear_off="true"
name="Help">
<menu_item_call
- label="How to..."
+ label="Guidebook"
name="How To"
shortcut="F1">
<menu_item_call.on_click
function="Help.ToggleHowTo"
parameter="" />
</menu_item_call>
- <menu_item_call
- label="Quickstart"
- name="Quickstart">
- <menu_item_call.on_click
- function="Advanced.ShowURL"
- parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Quickstart/ta-p/1087919"/>
- </menu_item_call>
<menu_item_separator/>
<menu_item_call
label="Knowledge Base"
diff --git a/indra/newview/skins/default/xui/en/menu_picks.xml b/indra/newview/skins/default/xui/en/menu_picks.xml
index ebb49c9004..a408e6136c 100644
--- a/indra/newview/skins/default/xui/en/menu_picks.xml
+++ b/indra/newview/skins/default/xui/en/menu_picks.xml
@@ -3,7 +3,17 @@
layout="topleft"
name="Picks">
<menu_item_call
- label="Info"
+ label="Teleport"
+ layout="topleft"
+ name="pick_teleport">
+ <menu_item_call.on_click
+ function="Pick.Teleport" />
+ <menu_item_call.on_enable
+ function="Pick.Enable"
+ parameter="teleport" />
+ </menu_item_call>
+ <menu_item_call
+ label="View Pick"
layout="topleft"
name="pick_info">
<menu_item_call.on_click
@@ -13,7 +23,7 @@
parameter="info" />
</menu_item_call>
<menu_item_call
- label="Edit"
+ label="Edit Pick"
layout="topleft"
name="pick_edit"
visible="false">
@@ -24,17 +34,7 @@
parameter="edit" />
</menu_item_call>
<menu_item_call
- label="Teleport"
- layout="topleft"
- name="pick_teleport">
- <menu_item_call.on_click
- function="Pick.Teleport" />
- <menu_item_call.on_enable
- function="Pick.Enable"
- parameter="teleport" />
- </menu_item_call>
- <menu_item_call
- label="Map"
+ label="Show on map"
layout="topleft"
name="pick_map">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_place_add_button.xml b/indra/newview/skins/default/xui/en/menu_place_add_button.xml
index e3a39a1242..ad49f7c3a8 100644
--- a/indra/newview/skins/default/xui/en/menu_place_add_button.xml
+++ b/indra/newview/skins/default/xui/en/menu_place_add_button.xml
@@ -1,27 +1,30 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
layout="topleft"
left="0"
mouse_opaque="false"
- name="menu_folder_gear"
+ name="menu_create"
visible="false">
<menu_item_call
- label="Add Folder"
+ label="Landmark current location"
layout="topleft"
- name="add_folder">
+ name="add_landmark">
<on_click
function="Places.LandmarksGear.Add.Action"
- parameter="category" />
+ parameter="add_landmark_root" />
<on_enable
function="Places.LandmarksGear.Enable"
- parameter="category" />
+ parameter="add_landmark_root" />
</menu_item_call>
<menu_item_call
- label="Add Landmark"
+ label="Create folder"
layout="topleft"
- name="add_landmark">
+ name="add_folder">
<on_click
function="Places.LandmarksGear.Add.Action"
- parameter="add_landmark" />
+ parameter="category_root" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="category_root" />
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
index 1aeb166e01..e9ada52a8f 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
@@ -7,15 +7,18 @@
name="menu_folder_gear"
visible="false">
<menu_item_call
- label="Add Landmark"
+ label="Landmark current location"
layout="topleft"
name="add_landmark">
<on_click
function="Places.LandmarksGear.Add.Action"
parameter="add_landmark" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="add_landmark" />
</menu_item_call>
<menu_item_call
- label="Add Folder"
+ label="Create subfolder"
layout="topleft"
name="add_folder">
<on_click
@@ -24,6 +27,9 @@
<on_enable
function="Places.LandmarksGear.Enable"
parameter="category" />
+ <on_visible
+ function="Places.LandmarksGear.Enable"
+ parameter="category" />
</menu_item_call>
<menu_item_call
label="Restore Item"
@@ -120,37 +126,4 @@
function="Places.LandmarksGear.Enable"
parameter="collapse" />
</menu_item_call>
- <menu_item_call
- label="Expand all folders"
- layout="topleft"
- name="expand_all">
- <on_click
- function="Places.LandmarksGear.Folding.Action"
- parameter="expand_all" />
- <on_enable
- function="Places.LandmarksGear.Enable"
- parameter="expand_all" />
- </menu_item_call>
- <menu_item_call
- label="Collapse all folders"
- layout="topleft"
- name="collapse_all">
- <on_click
- function="Places.LandmarksGear.Folding.Action"
- parameter="collapse_all" />
- <on_enable
- function="Places.LandmarksGear.Enable"
- parameter="collapse_all" />
- </menu_item_call>
- <menu_item_check
- label="Sort by Date"
- layout="topleft"
- name="sort_by_date">
- <on_check
- function="Places.LandmarksGear.Check"
- parameter="sort_by_date" />
- <on_click
- function="Places.LandmarksGear.Folding.Action"
- parameter="sort_by_date" />
- </menu_item_check>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
index ff5fdd3795..c89b498ddf 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
@@ -18,7 +18,18 @@
parameter="teleport" />
</menu_item_call>
<menu_item_call
- label="More Information"
+ label="Share"
+ layout="topleft"
+ name="share">
+ <on_click
+ function="Places.LandmarksGear.Custom.Action"
+ parameter="share" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="share" />
+ </menu_item_call>
+ <menu_item_call
+ label="View/Edit Landmark"
layout="topleft"
name="more_info">
<on_click
@@ -29,6 +40,28 @@
parameter="more_info" />
</menu_item_call>
<menu_item_call
+ label="Move to Landmarks"
+ layout="topleft"
+ name="Move to Landmarks">
+ <menu_item_call.on_click
+ function="Places.LandmarksGear.Custom.Action"
+ parameter="move_to_landmarks" />
+ <menu_item_call.on_visible
+ function="Places.LandmarksGear.Enable"
+ parameter="move_to_landmarks" />
+ </menu_item_call>
+ <menu_item_call
+ label="Move to Favorites"
+ layout="topleft"
+ name="Move to Favorites">
+ <menu_item_call.on_click
+ function="Places.LandmarksGear.Custom.Action"
+ parameter="move_to_favorites" />
+ <menu_item_call.on_visible
+ function="Places.LandmarksGear.Enable"
+ parameter="move_to_favorites" />
+ </menu_item_call>
+ <menu_item_call
label="Show on Map"
layout="topleft"
name="show_on_map">
@@ -39,26 +72,27 @@
function="Places.LandmarksGear.Enable"
parameter="show_on_map" />
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
<menu_item_call
- label="Add Landmark"
+ label="Copy SLurl"
layout="topleft"
- name="add_landmark">
+ name="copy_slurl">
<on_click
- function="Places.LandmarksGear.Add.Action"
- parameter="add_landmark" />
- </menu_item_call>
+ function="Places.LandmarksGear.CopyPaste.Action"
+ parameter="copy_slurl" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="copy_slurl" />
+ </menu_item_call>
<menu_item_call
- label="Add Folder"
+ label="Create Pick"
layout="topleft"
- name="add_folder">
+ name="create_pick">
<on_click
- function="Places.LandmarksGear.Add.Action"
- parameter="category" />
+ function="Places.LandmarksGear.Custom.Action"
+ parameter="create_pick" />
<on_enable
function="Places.LandmarksGear.Enable"
- parameter="category" />
+ parameter="create_pick" />
</menu_item_call>
<menu_item_call
label="Restore Item"
@@ -82,7 +116,7 @@
parameter="cut" />
</menu_item_call>
<menu_item_call
- label="Copy Landmark"
+ label="Copy"
layout="topleft"
name="copy_landmark">
<on_click
@@ -90,17 +124,6 @@
parameter="copy" />
</menu_item_call>
<menu_item_call
- label="Copy SLurl"
- layout="topleft"
- name="copy_slurl">
- <on_click
- function="Places.LandmarksGear.CopyPaste.Action"
- parameter="copy_slurl" />
- <on_enable
- function="Places.LandmarksGear.Enable"
- parameter="copy_slurl" />
- </menu_item_call>
- <menu_item_call
label="Paste"
layout="topleft"
name="paste">
@@ -133,53 +156,4 @@
function="Places.LandmarksGear.Enable"
parameter="delete" />
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
- <menu_item_call
- label="Expand all folders"
- layout="topleft"
- name="expand_all">
- <on_click
- function="Places.LandmarksGear.Folding.Action"
- parameter="expand_all" />
- <on_enable
- function="Places.LandmarksGear.Enable"
- parameter="expand_all" />
- </menu_item_call>
- <menu_item_call
- label="Collapse all folders"
- layout="topleft"
- name="collapse_all">
- <on_click
- function="Places.LandmarksGear.Folding.Action"
- parameter="collapse_all" />
- <on_enable
- function="Places.LandmarksGear.Enable"
- parameter="collapse_all" />
- </menu_item_call>
- <menu_item_check
- label="Sort by Date"
- layout="topleft"
- name="sort_by_date">
- <on_check
- function="Places.LandmarksGear.Check"
- parameter="sort_by_date" />
- <on_click
- function="Places.LandmarksGear.Folding.Action"
- parameter="sort_by_date" />
- <on_enable
- function="Places.LandmarksGear.Enable"
- parameter="sort_by_date" />
- </menu_item_check>
- <menu_item_call
- label="Create Pick"
- layout="topleft"
- name="create_pick">
- <on_click
- function="Places.LandmarksGear.Custom.Action"
- parameter="create_pick" />
- <on_enable
- function="Places.LandmarksGear.Enable"
- parameter="create_pick" />
- </menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml b/indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml
new file mode 100644
index 0000000000..4193a72e2e
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="menu_sorter_gear"
+ visible="false">
+ <menu_item_call
+ label="Expand all folders"
+ layout="topleft"
+ name="expand_all">
+ <on_click
+ function="Places.LandmarksGear.Folding.Action"
+ parameter="expand_all" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="expand_all" />
+ </menu_item_call>
+ <menu_item_call
+ label="Collapse all folders"
+ layout="topleft"
+ name="collapse_all">
+ <on_click
+ function="Places.LandmarksGear.Folding.Action"
+ parameter="collapse_all" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="collapse_all" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_check
+ label="Sort by Date"
+ layout="topleft"
+ name="sort_by_date">
+ <on_check
+ function="Places.LandmarksGear.Check"
+ parameter="sort_by_date" />
+ <on_click
+ function="Places.LandmarksGear.Folding.Action"
+ parameter="sort_by_date" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="sort_by_date" />
+ </menu_item_check>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml
index bc7d4fe33b..c11d668698 100644
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml
@@ -12,7 +12,8 @@
label="Expand all folders"
name="Expand all folders">
<menu_item_call.on_click
- function="TeleportHistory.ExpandAllFolders" />
+ function="TeleportHistory.GearMenu.Action"
+ parameter="expand_all" />
<on_enable
function="TeleportHistory.GearMenu.Enable"
parameter="expand_all" />
@@ -21,16 +22,10 @@
label="Collapse all folders"
name="Collapse all folders">
<menu_item_call.on_click
- function="TeleportHistory.CollapseAllFolders" />
+ function="TeleportHistory.GearMenu.Action"
+ parameter="collapse_all" />
<on_enable
function="TeleportHistory.GearMenu.Enable"
parameter="collapse_all" />
</menu_item_call>
- <menu_item_separator layout="topleft" />
- <menu_item_call
- label="Clear Teleport History"
- name="Clear Teleport History">
- <menu_item_call.on_click
- function="TeleportHistory.ClearTeleportHistory" />
- </menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
index f939c3996d..153e5a70a9 100644
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
@@ -1,26 +1,52 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<context_menu
+<toggleable_menu
+ name="Teleport History Item Menu"
layout="topleft"
- name="Teleport History Item Context Menu">
+ left="0"
+ mouse_opaque="false"
+ visible="false">
<menu_item_call
label="Teleport"
layout="topleft"
name="Teleport">
- <menu_item_call.on_click
- function="TeleportHistory.Teleport" />
+ <on_click
+ function="TeleportHistory.GearMenu.Action"
+ parameter="teleport" />
+ <on_enable
+ function="TeleportHistory.GearMenu.Enable"
+ parameter="teleport" />
</menu_item_call>
<menu_item_call
- label="More Information"
+ label="View"
layout="topleft"
name="More Information">
- <menu_item_call.on_click
- function="TeleportHistory.MoreInformation" />
+ <on_click
+ function="TeleportHistory.GearMenu.Action"
+ parameter="view" />
+ <on_enable
+ function="TeleportHistory.GearMenu.Enable"
+ parameter="view" />
+ </menu_item_call>
+ <menu_item_call
+ label="Show on map"
+ layout="topleft"
+ name="show_on_map">
+ <on_click
+ function="TeleportHistory.GearMenu.Action"
+ parameter="show_on_map" />
+ <on_enable
+ function="TeleportHistory.GearMenu.Enable"
+ parameter="show_on_map" />
</menu_item_call>
<menu_item_call
label="Copy SLurl"
layout="topleft"
name="CopyToClipboard">
- <menu_item_call.on_click
- function="TeleportHistory.CopyToClipboard" />
+ <on_click
+ function="TeleportHistory.GearMenu.Action"
+ parameter="copy_slurl" />
+ <on_enable
+ function="TeleportHistory.GearMenu.Enable"
+ parameter="copy_slurl" />
</menu_item_call>
-</context_menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 0a50ff089f..c550f69d26 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -15,24 +15,6 @@
function="ShowAgentProfile"
parameter="agent" />
</menu_item_call>
- <menu_item_call
- label="Appearance..."
- name="ChangeOutfit"
- shortcut="control|O">
- <menu_item_call.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="appearance" />
- <menu_item_call.on_enable
- function="Edit.EnableCustomizeAvatar" />
- </menu_item_call>
- <menu_item_call
- label="Choose an avatar..."
- name="Avatar Picker">
- <menu_item_call.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="avatar" />
- </menu_item_call>
- <menu_item_separator/>
<menu_item_check
label="Inventory..."
name="Inventory"
@@ -76,14 +58,6 @@
parameter="experiences"/>
</menu_item_call>
<menu_item_call
- label="My Scripts..."
- name="MyScripts">
- <menu_item_call.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="my_scripts"/>
- </menu_item_call>
- <menu_item_separator/>
- <menu_item_call
label="Camera Controls..."
name="Camera Controls"
shortcut="control|K">
@@ -91,119 +65,24 @@
function="Floater.ToggleOrBringToFront"
parameter="camera" />
</menu_item_call>
- <menu_item_call
- label="Hover Height"
- name="HoverHeight"
- shortcut="alt|control|H"
- use_mac_ctrl="true"
- visible="false">
- <menu_item_call.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="edit_hover_height"/>
- <menu_item_call.on_enable
- function="Edit.EnableHoverHeight"/>
- </menu_item_call>
- <menu
- create_jump_keys="true"
- label="Movement"
- name="Movement"
- tear_off="true">
- <menu_item_call
- label="Sit Down"
- layout="topleft"
- shortcut="alt|shift|S"
- name="Sit Down Here">
- <menu_item_call.on_click
- function="Self.SitDown"/>
- <menu_item_call.on_visible
- function="Self.ShowSitDown"/>
- <menu_item_call.on_enable
- function="Self.EnableSitDown" />
- </menu_item_call>
- <menu_item_call
- label="Stand Up"
- layout="topleft"
- shortcut="alt|shift|S"
- name="Stand up">
- <menu_item_call.on_click
- function="Self.StandUp"/>
- <menu_item_call.on_visible
- function="Self.EnableStandUp"/>
- <menu_item_call.on_enable
- function="Self.EnableStandUp" />
- </menu_item_call>
- <menu_item_check
- label="Fly"
- name="Fly"
- shortcut="HOME">
- <menu_item_check.on_check
- function="Agent.getFlying" />
- <menu_item_check.on_click
- function="Agent.toggleFlying" />
- <menu_item_check.on_enable
- function="Agent.enableFlying" />
- </menu_item_check>
- <menu_item_call
- label="Stop flying"
- name="Stop flying"
- shortcut="HOME">
- <menu_item_call.on_click
- function="Agent.toggleFlying" />
- <menu_item_call.on_enable
- function="Agent.getFlying" />
- </menu_item_call>
- <menu_item_check
- label="Always Run"
- name="Always Run"
- shortcut="control|R">
- <menu_item_check.on_check
- function="World.CheckAlwaysRun" />
- <menu_item_check.on_click
- function="World.AlwaysRun" />
- </menu_item_check>
- <menu_item_call
- label="Stop Animating Me"
- name="Stop Animating My Avatar"
- allow_key_repeat="true"
- shortcut="alt|shift|A">
- <menu_item_call.on_click
- function="Tools.StopAllAnimations" />
- </menu_item_call>
- <menu_item_check
- label="Walk / run / fly..."
- name="WalkRunFly">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="moveview" />
- <menu_item_check.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="moveview" />
- </menu_item_check>
- </menu>
- <menu
- create_jump_keys="true"
- label="Status"
- name="Status"
- tear_off="true">
- <menu_item_check
- name="Away"
- label="Away">
- <menu_item_check.on_check
- function="View.Status.CheckAway" />
- <menu_item_check.on_click
- function="World.SetAway" />
- </menu_item_check>
- <menu_item_check
- name="Do Not Disturb"
- label="Do Not Disturb">
- <menu_item_check.on_check
- function="View.Status.CheckDoNotDisturb" />
- <menu_item_check.on_click
- function="World.SetDoNotDisturb"/>
- </menu_item_check>
-
- </menu>
+ <menu_item_separator/>
+ <menu_item_check
+ name="Away"
+ label="Away">
+ <menu_item_check.on_check
+ function="View.Status.CheckAway" />
+ <menu_item_check.on_click
+ function="World.SetAway" />
+ </menu_item_check>
+ <menu_item_check
+ name="Do Not Disturb"
+ label="Do Not Disturb">
+ <menu_item_check.on_check
+ function="View.Status.CheckDoNotDisturb" />
+ <menu_item_check.on_click
+ function="World.SetDoNotDisturb"/>
+ </menu_item_check>
<menu_item_separator/>
@@ -228,6 +107,15 @@
name="ManageMyAccount_url"
parameter="WebLaunchJoinNow,http://secondlife.com/account/" />
</menu_item_call>
+ <menu_item_call
+ label="[Membership]"
+ name="Membership">
+ <menu_item_call.on_click
+ function="Advanced.ShowURL"
+ parameter="https://secondlife.com/my/account/membership.php"/>
+ <menu_item_call.on_visible
+ function="Membership.UpdateLabel"/>
+ </menu_item_call>
<menu_item_separator/>
@@ -275,6 +163,334 @@
</menu>
<menu
create_jump_keys="true"
+ label="Avatar"
+ name="Avatar"
+ tear_off="true">
+ <menu_item_call
+ label="Now wearing..."
+ name="NowWearing"
+ shortcut="control|O">
+ <menu_item_call.on_click
+ function="NowWearing" />
+ <menu_item_call.on_enable
+ function="Edit.EnableCustomizeAvatar" />
+ </menu_item_call>
+ <menu_item_call
+ label="My outfits..."
+ name="ChangeOutfit">
+ <menu_item_call.on_click
+ function="CustomizeAvatar" />
+ <menu_item_call.on_enable
+ function="Edit.EnableCustomizeAvatar" />
+ </menu_item_call>
+ <menu_item_call label="Hover height..."
+ layout="topleft"
+ shortcut="alt|control|H"
+ name="Hover Height">
+ <menu_item_call.on_click
+ function="HoverHeight" />
+ <menu_item_call.on_enable
+ function="Edit.EnableHoverHeight" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit shape..."
+ layout="topleft"
+ name="Edit My Shape">
+ <menu_item_call.on_click
+ function="EditShape" />
+ <menu_item_call.on_enable
+ function="Edit.EnableEditShape" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit outfit parts..."
+ layout="topleft"
+ name="Edit Outfit">
+ <menu_item_call.on_click
+ function="EditOutfit" />
+ <menu_item_call.on_enable
+ function="Edit.EnableCustomizeAvatar" />
+ </menu_item_call>
+ <menu
+ label="Take off"
+ layout="topleft"
+ name="Take Off &gt;">
+ <menu
+ label="Clothes"
+ layout="topleft"
+ name="Clothes &gt;">
+ <menu_item_call
+ enabled="false"
+ label="Shirt"
+ layout="topleft"
+ name="Shirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Pants"
+ layout="topleft"
+ name="Pants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="pants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Skirt"
+ layout="topleft"
+ name="Skirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="skirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Shoes"
+ layout="topleft"
+ name="Shoes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shoes" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Socks"
+ layout="topleft"
+ name="Socks">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="socks" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Jacket"
+ layout="topleft"
+ name="Jacket">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="jacket" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Gloves"
+ layout="topleft"
+ name="Gloves">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="gloves" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Undershirt"
+ layout="topleft"
+ name="Self Undershirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="undershirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Underpants"
+ layout="topleft"
+ name="Self Underpants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="underpants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Tattoo"
+ layout="topleft"
+ name="Self Tattoo">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="tattoo" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Physics"
+ layout="topleft"
+ name="Self Physics">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="physics" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="physics" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Alpha"
+ layout="topleft"
+ name="Self Alpha">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="alpha" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="All Clothes"
+ layout="topleft"
+ name="All Clothes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="all" />
+ </menu_item_call>
+ </menu>
+ <menu
+ label="HUD"
+ layout="topleft"
+ name="Avatar Detach HUD" />
+ <menu
+ label="Detach"
+ layout="topleft"
+ name="Avatar Detach" />
+ <menu_item_call
+ label="Detach All"
+ layout="topleft"
+ name="Detach All">
+ <menu_item_call.on_click
+ function="Self.RemoveAllAttachments"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableRemoveAllAttachments" />
+ </menu_item_call>
+ </menu>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Complete avatars..."
+ name="Avatar Picker">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="avatar" />
+ </menu_item_call>
+ <menu_item_separator/>
+
+ <menu_item_call
+ label="Sit / stand"
+ layout="topleft"
+ shortcut="alt|shift|S"
+ name="Sit stand">
+ <menu_item_call.on_click
+ function="Self.ToggleSitStand"/>
+ <menu_item_call.on_enable
+ function="Self.EnableSitStand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Fly / land"
+ name="Fly land"
+ shortcut="HOME">
+ <menu_item_call.on_click
+ function="Agent.toggleFlying" />
+ <menu_item_call.on_enable
+ function="Agent.enableFlyLand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Stop animations"
+ name="Stop Animating My Avatar">
+ <menu_item_call.on_click
+ function="Tools.StopAllAnimations" />
+ </menu_item_call>
+ <menu_item_check
+ label="Walk / run / fly..."
+ name="WalkRunFly">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="moveview" />
+ <menu_item_check.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="moveview" />
+ </menu_item_check>
+ <menu_item_check
+ label="Always run"
+ name="Always Run"
+ shortcut="control|R">
+ <menu_item_check.on_check
+ function="World.CheckAlwaysRun" />
+ <menu_item_check.on_click
+ function="World.AlwaysRun" />
+ </menu_item_check>
+ <menu_item_separator/>
+ <menu_item_check
+ label="Gestures..."
+ name="Gestures"
+ shortcut="control|G">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="gestures" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="gestures" />
+ </menu_item_check>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Reset skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
+ <menu_item_call
+ label="Reset skeleton and animations"
+ layout="topleft"
+ name="Reset Skeleton And Animations">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeletonAndAnimations" />
+ </menu_item_call>
+ <menu_item_call
+ label="Attachment scripts..."
+ name="MyScripts">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="my_scripts"/>
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Help with avatars..."
+ name="Help with avatars">
+ <menu_item_call.on_click
+ function="Advanced.ShowURL"
+ parameter="https://community.secondlife.com/search/?type=cms_records3&amp;tags=avatar&amp;nodes=30&amp;search_and_or=or"/>
+ </menu_item_call>
+ </menu>
+ <menu
+ create_jump_keys="true"
label="Communicate"
name="Communicate"
tear_off="true">
@@ -540,12 +756,18 @@
parameter="region_info" />
</menu_item_call>
<menu_item_call
- label="My land holdings..."
- name="My Land">
+ label="My Linden Home..."
+ name="Linden Home">
+ <menu_item_call.on_click
+ function="World.LindenHome"/>
+ </menu_item_call>
+ <menu_item_call
+ label="My land holdings..."
+ name="My Land">
<menu_item_call.on_click
function="Floater.Show"
parameter="land_holdings" />
- </menu_item_call>
+ </menu_item_call>
<menu_item_call
label="Buy this land"
name="Buy Land">
@@ -1388,20 +1610,13 @@ function="World.EnvPreset"
name="Help"
tear_off="true">
<menu_item_call
- label="How to..."
+ label="Guidebook"
name="How To"
shortcut="F1">
<menu_item_call.on_click
function="Help.ToggleHowTo"
parameter="" />
</menu_item_call>
- <menu_item_call
- label="Quickstart"
- name="Quickstart">
- <menu_item_call.on_click
- function="Advanced.ShowURL"
- parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Quickstart/ta-p/1087919"/>
- </menu_item_call>
<!-- <menu_item_call
label="Tutorial"
name="Tutorial">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index a1c73d12d0..4a02b576c2 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1024,18 +1024,6 @@ The group no longer has open enrollment.
<notification
icon="alertmodal.tga"
- name="JoinGroupSuccess"
- type="alertmodal">
-You have been added to the group
- <tag>group_id</tag>
- <tag>success</tag>
- <usetemplate
- name="okbutton"
- yestext="OK"/>
- </notification>
-
- <notification
- icon="alertmodal.tga"
name="JoinGroupInsufficientFunds"
type="alertmodal">
Unable to transfer the required L$ [membership_fee] membership fee.
@@ -2332,6 +2320,29 @@ You cannot create a landmark here because the owner of the land doesn&apos;t all
</notification>
<notification
+ icon="alertmodal.tga"
+ label="Create folder"
+ name="CreateLandmarkFolder"
+ type="alertmodal">
+ <unique/>
+ Choose a name for the folder:
+ <tag>confirm</tag>
+ <form name="form">
+ <input name="message" type="text">
+ </input>
+ <button
+ default="true"
+ index="0"
+ name="OK"
+ text="OK"/>
+ <button
+ index="1"
+ name="Cancel"
+ text="Cancel"/>
+ </form>
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="CannotRecompileSelectObjectsNoScripts"
type="alertmodal">
@@ -2443,9 +2454,8 @@ Teleport failed.
icon="alertmodal.tga"
name="invalid_tport"
type="alertmodal">
-Problem encountered processing your teleport request. You may need to log back in before you can teleport.
-If you continue to get this message, please check the [SUPPORT_SITE].
- <tag>fail</tag>
+Teleport attempts are limited to 6 per minute. If you are having trouble, wait one minute and try teleporting again. If the problem persists, log out and log in again.
+ <tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
@@ -3153,7 +3163,30 @@ See https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries
text="Cancel"/>
</form>
</notification>
-
+
+ <notification
+ icon="alertmodal.tga"
+ label="Rename Landmark"
+ name="RenameLandmark"
+ type="alertmodal">
+ Choose a new name for [NAME]
+ <tag>confirm</tag>
+ <form name="form">
+ <input name="new_name" type="text" width="300">
+ [NAME]
+ </input>
+ <button
+ default="true"
+ index="0"
+ name="OK"
+ text="OK"/>
+ <button
+ index="1"
+ name="Cancel"
+ text="Cancel"/>
+ </form>
+ </notification>
+
<notification
icon="alertmodal.tga"
name="RemoveFromFriends"
@@ -4257,13 +4290,6 @@ Leave Group?
yestext="OK"/>
</notification>
- <notification
- icon="notify.tga"
- name="GroupDepart"
- type="notify">
-You have left the group &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;.
- <tag>group</tag>
- </notification>
<notification
icon="alertmodal.tga"
@@ -5066,7 +5092,9 @@ Do you wish to proceed?
name="RegionEntryAccessBlocked"
type="alertmodal">
<tag>fail</tag>
- The region you're trying to visit contains content exceeding your current preferences. You can change your preferences using Me &gt; Preferences &gt; General.
+ The region you’re trying to visit has a maturity rating exceeding your maximum maturity preference. Change this preference using Me menu &gt; Preferences &gt; General.
+
+Complete information on maturity ratings can be found [https://community.secondlife.com/knowledgebase/english/maturity-ratings-r52/ here].
<usetemplate
name="okbutton"
yestext="OK"/>
@@ -5153,7 +5181,9 @@ The region you're trying to visit contains [REGIONMATURITY] content, but your cu
name="TeleportEntryAccessBlocked"
type="alertmodal">
<tag>fail</tag>
- The region you're trying to visit contains content exceeding your current preferences. You can change your preferences using Me &gt; Preferences &gt; General.
+ The region you’re trying to visit has a maturity rating exceeding your maximum maturity preference. Change this preference using Me menu &gt; Preferences &gt; General.
+
+Complete information on maturity ratings can be found [https://community.secondlife.com/knowledgebase/english/maturity-ratings-r52/ here].
<usetemplate
name="okbutton"
yestext="OK"/>
@@ -5302,6 +5332,8 @@ You won't receive any more notifications that you're about to visit a region wit
name="LandClaimAccessBlocked"
type="alertmodal">
The land you're trying to claim has a maturity rating exceeding your current preferences. You can change your preferences using Me &gt; Preferences &gt; General.
+
+Complete information on maturity ratings can be found [https://community.secondlife.com/knowledgebase/english/maturity-ratings-r52/ here].
<tag>fail</tag>
<usetemplate
name="okbutton"
@@ -5371,6 +5403,8 @@ You won't receive any more notifications that you're about to visit a region wit
name="LandBuyAccessBlocked"
type="alertmodal">
The land you're trying to buy has a maturity rating exceeding your current preferences. You can change your preferences using Me &gt; Preferences &gt; General.
+
+Complete information on maturity ratings can be found [https://community.secondlife.com/knowledgebase/english/maturity-ratings-r52/ here].
<tag>fail</tag>
<usetemplate
name="okbutton"
@@ -7239,8 +7273,10 @@ You can only claim public land in the Region you&apos;re in.
name="RegionTPAccessBlocked"
type="alertmodal">
<tag>fail</tag>
- The region you're trying to visit contains content exceeding your current preferences. You can change your preferences using Me &gt; Preferences &gt; General.
- <usetemplate
+ The region you’re trying to visit has a maturity rating exceeding your maximum maturity preference. Change this preference using Me menu &gt; Preferences &gt; General.
+
+Complete information on maturity ratings can be found [https://community.secondlife.com/knowledgebase/english/maturity-ratings-r52/ here].
+ <usetemplate
name="okbutton"
yestext="OK"/>
</notification>
@@ -8682,7 +8718,7 @@ This upload will cost L$[PRICE], do you wish to continue with the upload?
icon="alertmodal.tga"
name="ConfirmClearTeleportHistory"
type="alertmodal">
-Are you sure you want to delete your teleport history?
+This will delete the entire list of places you have visited, and cannot be undone. Continue?
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
@@ -9588,6 +9624,12 @@ You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_
If you continue to have problems, please visit the [SUPPORT_SITE].
</global>
+ <global name="UnsupportedIntelDriver">
+The installed Intel graphics driver for [GPUNAME], version [VERSION], is significantly out of date and is known to cause excessive rates of program crashes. You are strongly advised to update to a current Intel driver
+
+Do you want to check the Intel driver website?
+ </global>
+
<global name="UnsupportedCPUAmount">
796
</global>
@@ -11507,7 +11549,28 @@ Cannot create large prims that intersect other residents. Please re-try when ot
name="okbutton"
yestext="OK"/>
</notification>
-
+
+ <notification
+ icon="alertmodal.tga"
+ name="AddPaymentMethod"
+ type="alertmodal">
+On the following page, choose a L$ amount
+and click a place Order button. You will be
+able to add a payment method at checkout.
+ <tag>confirm</tag>
+ <form name="form">
+ <button
+ default="true"
+ index="0"
+ width="120"
+ name="Continue"
+ text="Continue"/>
+ <button
+ index="1"
+ name="Cancel"
+ text="Cancel"/>
+ </form>
+ </notification>
<notification
icon="alert.tga"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
index 553c112e6f..357a5559bf 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
@@ -26,7 +26,7 @@
name="back_btn"
left="10"
tab_stop="false"
- top="2"
+ top="4"
width="30"
use_draw_context_alpha="false" />
<text
@@ -39,17 +39,17 @@
left_pad="4"
name="title"
text_color="LtGray"
- top="2"
+ top="4"
width="250">
Edit Pick
</text>
<scroll_container
color="DkGray2"
follows="all"
- height="502"
+ height="501"
layout="topleft"
left="8"
- top_pad="10"
+ top_pad="9"
name="profile_scroll"
opaque="true"
width="312">
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 dc1553e6a3..85d73ece48 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -13,7 +13,7 @@
width="333">
<string
name="edit_shape_title">
- Editing Shape
+ Shape
</string>
<string
name="edit_skin_title">
diff --git a/indra/newview/skins/default/xui/en/panel_favorites.xml b/indra/newview/skins/default/xui/en/panel_favorites.xml
new file mode 100644
index 0000000000..1e8ea34ad2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_favorites.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ name="Favorites"
+ layout="topleft"
+ left="0"
+ border="false"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ follows="all">
+ <places_inventory_panel
+ allow_multi_select="true"
+ border="false"
+ top="1"
+ left="3"
+ bottom="0"
+ follows="all"
+ right="-3"
+ mouse_opaque="true"
+ name="favorites_list"
+ folder_view.use_ellipses="true"
+ start_folder.name="Favorites"/>
+</panel>
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 7935d66aee..e82305ef17 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -67,7 +67,7 @@
name="back_btn"
tool_tip="Back"
tab_stop="false"
- top="4"
+ top="2"
width="30"
use_draw_context_alpha="false" />
<text
@@ -78,20 +78,20 @@
left_pad="7"
name="title"
text_color="LtGray"
- top="3"
+ top="2"
use_ellipses="true"
value="Place Profile"
width="280" />
<scroll_container
color="DkGray2"
follows="all"
- height="532"
+ height="534"
layout="topleft"
left="9"
name="place_scroll"
opaque="true"
- top_pad="10"
- width="310">
+ top_pad="9"
+ width="324">
<panel
bg_alpha_color="DkGray2"
follows="left|top|right"
@@ -282,7 +282,6 @@
enabled="false"
use_bg_color="true"
bg_color="DkGray0"
- parse_urls="false"
follows="left|top|right"
height="22"
layout="topleft"
@@ -290,8 +289,18 @@
name="title_value"
text_color="white"
top_pad="5"
- use_ellipses="true"
- width="290" />
+ width="200" />
+ <button
+ follows="top|right"
+ height="24"
+ label="Edit"
+ layout="topleft"
+ left_pad="8"
+ mouse_opaque="false"
+ name="edit_btn"
+ tool_tip="Edit landmark information"
+ top_delta="-1"
+ width="83" />
<line_editor
follows="left|top|right"
height="22"
@@ -301,8 +310,8 @@
name="title_editor"
prevalidate_callback="ascii"
text_readonly_color="white"
- top_delta="0"
- width="290" />
+ top_delta="1"
+ width="290"/>
<text
follows="left|top"
height="15"
@@ -344,17 +353,6 @@
name="folder_combo"
top_pad="5"
width="200" />
- <button
- follows="bottom|left|right"
- height="23"
- label="Edit"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- name="edit_btn"
- tool_tip="Edit landmark information"
- top_pad="-42"
- width="100" />
</panel>
</panel>
</scroll_container>
diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml
index 67a09949ce..10b925ec93 100644
--- a/indra/newview/skins/default/xui/en/panel_landmarks.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml
@@ -1,198 +1,23 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
name="Landmarks"
- top="0"
- height="400"
layout="topleft"
left="0"
- width="313"
help_topic="panel_landmarks"
border="false"
background_visible="true"
bg_alpha_color="DkGray"
follows="all">
- <accordion
- background_visible="true"
- bg_alpha_color="DkGray2"
- bg_opaque_color="DkGray2"
- follows="all"
- height="373"
- layout="topleft"
- left="3"
- name="landmarks_accordion"
- top="0"
- width="307">
- <accordion_tab
- layout="topleft"
- name="tab_favorites"
- title="Favorites bar">
- <places_inventory_panel
- allow_multi_select="true"
- border="false"
- bottom="0"
- follows="all"
- height="126"
- left="0"
- mouse_opaque="true"
- name="favorites_list"
- scroll.hide_scrollbar="true"
- folder_view.use_ellipses="true"
- start_folder.name="Favorites"
- width="307"/>
- </accordion_tab>
- <accordion_tab
- layout="topleft"
- name="tab_landmarks"
- title="My Landmarks">
- <places_inventory_panel
- allow_multi_select="true"
- border="false"
- bottom="0"
- follows="all"
- height="126"
- left="0"
- mouse_opaque="true"
- name="landmarks_list"
- scroll.hide_scrollbar="true"
- folder_view.use_ellipses="true"
- start_folder.name="Landmarks"
- width="307"/>
- </accordion_tab>
- <accordion_tab
- layout="topleft"
- name="tab_inventory"
- title="My Inventory">
- <places_inventory_panel
- allow_multi_select="true"
- border="false"
- bottom="0"
- follows="all"
- height="126"
- left="0"
- mouse_opaque="true"
- name="my_inventory_list"
- scroll.hide_scrollbar="true"
- folder_view.use_ellipses="true"
- start_folder.name="My Inventory"
- width="307"/>
- </accordion_tab>
- <accordion_tab
- layout="topleft"
- name="tab_library"
- title="Library">
- <places_inventory_panel
- allow_multi_select="true"
- border="false"
- bottom="0"
- follows="all"
- height="126"
- left="0"
- mouse_opaque="true"
- name="library_list"
- scroll.hide_scrollbar="true"
- folder_view.use_ellipses="true"
- start_folder.name="LIBRARY"
- width="313"/>
- </accordion_tab>
- </accordion>
- <panel
- background_visible="true"
- bevel_style="none"
- bottom="0"
- follows="left|right|bottom"
- height="27"
- layout="bottomleft"
- left="3"
- name="bottom_panel"
- width="313">
-
- <layout_stack
- animate="false"
- border_size="0"
- follows="left|right|bottom"
- height="25"
- layout="topleft"
- orientation="horizontal"
- top_pad="1"
- left="0"
- name="bottom_panel"
- width="307">
- <layout_panel
- auto_resize="false"
- height="25"
- layout="topleft"
- name="options_gear_btn_panel"
- width="32">
- <menu_button
- follows="bottom|left"
- tool_tip="Show additional options"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="options_gear_btn"
- top="0"
- width="31" />
- </layout_panel>
- <layout_panel
- auto_resize="false"
- height="25"
- layout="topleft"
- name="add_btn_panel"
- width="32">
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="AddItem_Off"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- layout="topleft"
- left="0"
- name="add_btn"
- tool_tip="Add new landmark"
- top="0"
- width="31" />
- </layout_panel>
- <layout_panel
- auto_resize="true"
- height="25"
- layout="topleft"
- name="dummy_panel"
- width="212">
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Middle_Off"
- layout="topleft"
- left="0"
- top="0"
- name="dummy_icon"
- width="211" />
- </layout_panel>
- <layout_panel
- auto_resize="false"
- height="25"
- layout="topleft"
- name="trash_btn_panel"
- width="31">
- <dnd_button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Right_Over"
- image_overlay="TrashItem_Off"
- image_selected="Toolbar_Right_Selected"
- image_unselected="Toolbar_Right_Off"
- left="0"
- layout="topleft"
- name="trash_btn"
- tool_tip="Remove selected landmark"
- top="0"
- width="31"/>
- </layout_panel>
- </layout_stack>
- </panel>
+ <places_inventory_panel
+ allow_multi_select="true"
+ border="false"
+ top="1"
+ follows="all"
+ left="3"
+ bottom="0"
+ right="-3"
+ mouse_opaque="true"
+ name="landmarks_list"
+ folder_view.use_ellipses="true"
+ start_folder.name="Landmarks"/>
</panel>
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 d77fbdec0a..2ff58035ed 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -32,30 +32,20 @@
left="12"
name="ItemcountText"
font="SansSerifMedium"
- text_color="EmphasisColor"
+ text_color="InventoryItemLinkColor"
use_ellipses="true"
top_pad="0"
width="300">
Items:
</text>
- <filter_editor
- text_pad_left="10"
- follows="left|top|right"
+ <combo_box
height="23"
- label="Enter search text"
layout="topleft"
left="10"
- max_length_chars="300"
- name="inventory search editor"
top="18"
- width="208" />
- <combo_box
- height="23"
- layout="topleft"
- left_pad="4"
name="search_type"
- follows="top|right"
- width="90">
+ follows="top|left"
+ width="88">
<item
label="Name"
name="Name"
@@ -72,7 +62,27 @@
label="UUID"
name="UUID"
value="search_by_UUID"/>
- </combo_box>
+ </combo_box>
+ <menu_button
+ follows="top|left"
+ tool_tip="Show search visibility options"
+ height="23"
+ image_overlay="Inv_Toolbar_SearchVisibility"
+ layout="topleft"
+ left_pad="3"
+ name="options_visibility_btn"
+ width="31" />
+ <filter_editor
+ text_pad_left="10"
+ follows="left|top|right"
+ height="23"
+ label="Enter search text"
+ layout="topleft"
+ left_pad="3"
+ max_length_chars="300"
+ highlight_text_field="true"
+ name="inventory search editor"
+ width="177" />
<tab_container
follows="all"
halign="center"
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 c7edba21f8..2dae2649a9 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -151,30 +151,43 @@
layout="topleft"
auto_resize="true"
user_resize="true"
- min_width="185"
+ min_width="254"
name="favorites_layout_panel"
- width="320">
+ width="342">
<icon
follows="top|left"
height="25"
image_name="ChatBarHandle"
layout="topleft"
- left="-323"
+ left="-345"
name="resize_handle"
top="4"
width="5" />
-
+ <button
+ height="23"
+ width="32"
+ layout="topleft"
+ mouse_opaque="true"
+ follows="left|top"
+ name="landmarks_btn"
+ tool_tip="My Landmarks"
+ top_delta="1"
+ left_pad="8"
+ scale_image="false"
+ image_overlay="Landmarks_overlay"
+ image_hover_unselected="PushButton_Over">
+ </button>
<favorites_bar
follows="left|right|top"
font="SansSerifSmall"
height="20"
layout="topleft"
- left="0"
+ left_pad="0"
top="4"
name="favorite"
image_drag_indication="Accordion_ArrowOpened_Off"
tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
- width="320">
+ width="310">
<label
follows="left|top"
height="13"
@@ -185,8 +198,8 @@
tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
top="13"
valign="bottom"
- width="102">
- Favorites Bar
+ width="205">
+ Your saved locations will appear here.
</label>
<!-- More button actually is a text box. -->
<more_button
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 3f7444dec3..d625f89f3b 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -81,7 +81,7 @@
name="title"
text_color="LtGray"
top="0"
- value="Edit Outfit"
+ value="Edit outfit parts"
use_ellipses="true"
width="275" />
@@ -510,27 +510,31 @@ It is calculated as border_size + 2*UIResizeBarOverlap
<button
follows="bottom|left|right"
height="23"
- label="Save"
+ label="Save changes"
left="1"
layout="topleft"
name="save_btn"
top="0"
width="155" />
- <button
- follows="bottom|right"
- height="23"
- name="save_flyout_btn"
- label=""
- layout="topleft"
- left_pad="-20"
- tab_stop="false"
- top="0"
- image_selected="SegmentedBtn_Right_Selected_Press"
- image_unselected="SegmentedBtn_Right_Off"
- image_pressed="SegmentedBtn_Right_Press"
- image_pressed_selected="SegmentedBtn_Right_Selected_Press"
- image_overlay="Arrow_Small_Up"
- width="20"/>
+ </layout_panel>
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left_pad="3"
+ mouse_opaque="false"
+ name="save_as_btn_lp"
+ auto_resize="true"
+ width="156">
+ <button
+ follows="bottom|left|right"
+ height="23"
+ label="Save as..."
+ layout="topleft"
+ name="save_as_btn"
+ top="0"
+ left="1"
+ width="155" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index 6c8cc9d39a..7b898dbd7f 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -100,28 +100,33 @@
<button
follows="bottom|left|right"
height="23"
- label="Save As"
+ label="Save changes"
left="1"
layout="topleft"
name="save_btn"
top="0"
width="155" />
- <button
- follows="bottom|right"
- height="23"
- name="save_flyout_btn"
- label=""
- layout="topleft"
- left_pad="-20"
- tab_stop="false"
- image_selected="SegmentedBtn_Right_Selected_Press"
- image_unselected="SegmentedBtn_Right_Off"
- image_pressed="SegmentedBtn_Right_Press"
- image_pressed_selected="SegmentedBtn_Right_Selected_Press"
- image_overlay="Arrow_Small_Up"
- width="20"/>
- </layout_panel>
- <layout_panel
+ </layout_panel>
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left_pad="3"
+ mouse_opaque="false"
+ name="save_as_btn_lp"
+ auto_resize="true"
+ width="156">
+ <button
+ follows="bottom|left|right"
+ height="23"
+ label="Save as..."
+ layout="topleft"
+ name="save_as_btn"
+ top="0"
+ left="1"
+ width="155" />
+ </layout_panel>
+ <layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index c4248d9b92..50035fd0e3 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -12,7 +12,7 @@
width="333">
<string
name="no_recent_people"
- value="No recent people. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." />
+ value="No recent people." />
<string
name="no_filtered_recent_people"
value="Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]." />
@@ -30,8 +30,13 @@
value="No friends" />
<string
name="no_friends_msg">
- Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend.
-Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map].
+ To add someone as a friend, right-click on their avatar or their name.
+
+Looking for places with more people?
+
+[secondlife:///app/floater/destinations Destination Guide] has locations chosen by Second Life staff.
+
+[secondlife:///app/search/ Search] lets you search all of Second Life for certain keywords.
</string>
<string
name="no_filtered_friends_msg">
@@ -45,8 +50,11 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
name="no_filtered_groups_msg"
value="Didn't find what you're looking for? Try [secondlife:///app/search/groups/[SEARCH_TERM] Search]." />
<string
- name="no_groups_msg"
- value="Looking for Groups to join? Try [secondlife:///app/search/groups Search]." />
+ name="no_groups_msg">
+You are not a member of any groups.
+
+Learn about [https://community.secondlife.com/knowledgebase/joining-and-participating-in-groups-r51/ groups in Second Life.]
+ </string>
<string
name="MiniMapToolTipMsg"
value="[REGION](Double-click to open Map, shift-drag to pan)"/>
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index 36b7b0501b..bdde2cab20 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -172,7 +172,7 @@
name="back_btn"
tool_tip="Back"
tab_stop="false"
- top="4"
+ top="2"
width="30"
use_draw_context_alpha="false" />
<text
@@ -183,20 +183,20 @@
left_pad="10"
name="title"
text_color="LtGray"
- top="4"
+ top="2"
use_ellipses="true"
value="Place Profile"
width="280" />
<scroll_container
color="DkGray2"
follows="all"
- height="572"
+ height="575"
layout="topleft"
left="9"
name="place_scroll"
opaque="true"
- top_pad="10"
- width="310">
+ top_pad="9"
+ width="324">
<panel
bg_alpha_color="DkGray2"
follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index 1f32ae53ba..58be4d4c5e 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -11,30 +11,156 @@ background_visible="true"
top="0"
left="0"
width="333">
- <string
- name="landmarks_tab_title"
- value="MY LANDMARKS" />
- <string
- name="teleport_history_tab_title"
- value="TELEPORT HISTORY" />
- <filter_editor
- text_pad_left="10"
- follows="left|top|right"
- font="SansSerifSmall"
- height="23"
- layout="topleft"
- left="10"
- label="Filter My Places"
- max_length_chars="300"
- name="Filter"
- tab_group="1"
- top="3"
- width="303" />
+ <string
+ name="landmarks_tab_title"
+ value="LANDMARKS" />
+ <string
+ name="teleport_history_tab_title"
+ value="VISITED" />
+ <string
+ name="favorites_tab_title"
+ value="FAVORITES" />
+ <string
+ name="tooltip_trash_items"
+ value="Remove selected landmark or folder" />
+ <string
+ name="tooltip_trash_history"
+ value="Delete list of visited places" />
+ <layout_stack
+ animate="false"
+ border_size="0"
+ follows="all"
+ height="564"
+ layout="topleft"
+ orientation="vertical"
+ top="1"
+ left="0"
+ name="places_layout_panel"
+ width="333">
+ <layout_panel
+ auto_resize="true"
+ height="538"
+ layout="topleft"
+ name="main_panel"
+ width="333">
+ <layout_stack
+ animate="false"
+ border_size="0"
+ follows="left|top|right"
+ height="27"
+ layout="topleft"
+ orientation="horizontal"
+ top="0"
+ left="0"
+ name="top_menu_panel"
+ width="320">
+ <layout_panel
+ auto_resize="true"
+ layout="topleft"
+ name="filter_panel"
+ width="193">
+ <filter_editor
+ text_pad_left="10"
+ follows="left|top|right"
+ font="SansSerifSmall"
+ height="23"
+ layout="topleft"
+ left="10"
+ label="Filter My Places"
+ max_length_chars="300"
+ name="Filter"
+ tab_group="1"
+ top="3"
+ width="181" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ height="25"
+ layout="topleft"
+ name="options_gear_btn_panel"
+ width="32">
+ <menu_button
+ follows="bottom|left"
+ tool_tip="Show options"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ menu_position="bottomleft"
+ layout="topleft"
+ left="0"
+ name="options_gear_btn"
+ top="0"
+ width="31" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ height="25"
+ layout="topleft"
+ name="options_sort_btn_panel"
+ width="32">
+ <menu_button
+ follows="bottom|left"
+ tool_tip="Show sorting options"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Conv_toolbar_sort"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ menu_position="bottomleft"
+ layout="topleft"
+ left="0"
+ name="sorting_menu_btn"
+ top="0"
+ width="31" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ height="25"
+ layout="topleft"
+ name="add_btn_panel"
+ width="32">
+ <menu_button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="AddItem_Off"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ menu_position="bottomleft"
+ layout="topleft"
+ left="0"
+ name="add_menu_btn"
+ tool_tip="Add new landmark or folder"
+ top="0"
+ width="31" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ height="25"
+ layout="topleft"
+ name="trash_btn_panel"
+ width="31">
+ <dnd_button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Right_Over"
+ image_overlay="TrashItem_Off"
+ image_selected="Toolbar_Right_Selected"
+ image_unselected="Toolbar_Right_Off"
+ left="0"
+ layout="topleft"
+ name="trash_btn"
+ top="0"
+ width="31"/>
+ </layout_panel>
+ </layout_stack>
<tab_container
follows="all"
- halign="center"
- height="503"
layout="topleft"
+ halign="center"
+ height="504"
left="6"
name="Places Tabs"
tab_min_width="80"
@@ -42,40 +168,50 @@ background_visible="true"
tab_height="30"
tab_group="2"
tab_position="top"
- top_pad="10"
- width="315" />
+ top_pad="7"
+ width="318"
+ visible="true"/>
<panel
class="panel_place_profile"
filename="panel_place_profile.xml"
follows="all"
- height="533"
layout="topleft"
+ height="533"
left="0"
+ top="4"
help_topic="place_profile"
name="panel_place_profile"
- top="5"
visible="false"
- width="315" />
+ width="318" />
<panel
class="panel_landmark_info"
filename="panel_landmark_info.xml"
follows="all"
- height="533"
layout="topleft"
+ height="533"
left="0"
+ top="4"
help_topic="landmark"
name="panel_landmark_info"
- top="5"
visible="false"
- width="315" />
+ width="318" />
+ </layout_panel>
+
+ <!--*********************** Button wrappers ***********************-->
+ <layout_panel
+ auto_resize="false"
+ layout="topleft"
+ height="25"
+ name="button_layout_panel">
<panel
follows="bottom|left|right"
height="23"
layout="topleft"
left="4"
+ top="2"
name="button_panel"
- width="315">
-
+ width="318">
+
<layout_stack
follows="bottom|left|right"
height="23"
@@ -186,41 +322,6 @@ background_visible="true"
name="lp2"
auto_resize="true"
width="116">
-
- <!--*********************** Profile button ***********************-->
-
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- mouse_opaque="false"
- name="bottom_bar_profile_ls"
- left="0"
- orientation="horizontal"
- top="0"
- width="110">
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- mouse_opaque="false"
- name="profile_btn_lp"
- auto_resize="true"
- width="102">
- <button
- follows="bottom|left|right"
- height="23"
- label="Profile"
- layout="topleft"
- mouse_opaque="false"
- name="profile_btn"
- left="1"
- tool_tip="Show place profile"
- top="0"
- width="101" />
- </layout_panel>
- </layout_stack>
<!--*********************** Close button ***********************-->
@@ -265,6 +366,7 @@ background_visible="true"
<layout_stack
follows="bottom|left|right"
+ animate="false"
height="23"
layout="topleft"
mouse_opaque="false"
@@ -319,4 +421,6 @@ background_visible="true"
</layout_panel>
</layout_stack>
</panel>
+ </layout_panel>
+ </layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
index 0e3de821d1..1ad78dbb13 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
@@ -38,7 +38,7 @@
height="10"
layout="topleft"
left_delta="10"
- top_delta="30"
+ top_delta="25"
width="100">
Position:
</text>
@@ -93,7 +93,7 @@
follows="left|top"
height="10"
layout="topleft"
- left_delta="-5"
+ left_delta="65"
top_delta="20"
width="80">
Color:
@@ -108,12 +108,58 @@
name="sun_moon_color"
top_pad="5"
width="60" />
+ <text
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-235"
+ top_delta="-3"
+ width="200">
+ Azimuth:
+ </text>
+ <slider
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="0"
+ max_val="359.99"
+ name="sun_azimuth"
+ top_delta="13"
+ width="215"
+ can_edit_text="true"/>
+ <text
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-5"
+ top_delta="22"
+ width="200">
+ Elevation:
+ </text>
+ <slider
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="-90"
+ max_val="90"
+ name="sun_elevation"
+ top_delta="13"
+ width="215"
+ can_edit_text="true"/>
<text
follows="left|top"
height="10"
layout="topleft"
- left_delta="-160"
- top_delta="27"
+ left_delta="-5"
+ top_delta="22"
width="200">
Glow Focus:
</text>
@@ -128,8 +174,8 @@
min_val="-2"
max_val="2"
name="glow_focus"
- top_delta="15"
- width="250"
+ top_delta="13"
+ width="215"
can_edit_text="true"/>
<text
follows="left|top"
@@ -151,8 +197,8 @@
min_val="0"
max_val="1.99"
name="glow_size"
- top_delta="15"
- width="250"
+ top_delta="13"
+ width="215"
can_edit_text="true"/>
<text
follows="left|top"
@@ -174,20 +220,20 @@
min_val="0"
max_val="500"
name="star_brightness"
- top_delta="15"
- width="250"
+ top_delta="13"
+ width="215"
can_edit_text="true"/>
<check_box
control_name="sunbeacon"
+ follows="left|top"
+ layout="topleft"
width="60"
height="16"
label="Show Beacon"
- layout="topleft"
- name="sunbeacon"
- right="-50"
- bottom="-10"
- follows="bottom|right"/>
+ name="sunbeacon"
+ top_pad="5"
+ left_delta="-8"/>
</layout_panel>
<layout_panel
@@ -227,7 +273,7 @@
height="10"
layout="topleft"
left_delta="10"
- top_delta="30"
+ top_delta="25"
width="100">
Position:
</text>
@@ -278,39 +324,85 @@
top_delta="15"
width="130"
can_edit_text="true"/>
- <text
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="-5"
- top_delta="22"
- width="200">
- Brightness:
- </text>
- <slider
- decimal_digits="2"
- follows="left|top"
- height="16"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- left_delta="5"
- min_val="0.0"
- max_val="1.0"
- name="moon_brightness"
- top_delta="15"
- width="130"
- can_edit_text="true"/>
- <check_box
+ <text
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-170"
+ top_delta="32"
+ width="200">
+ Azimuth:
+ </text>
+ <slider
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="0"
+ max_val="359.99"
+ name="moon_azimuth"
+ top_delta="13"
+ width="215"
+ can_edit_text="true"/>
+ <text
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-5"
+ top_delta="22"
+ width="200">
+ Elevation:
+ </text>
+ <slider
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="-90"
+ max_val="90"
+ name="moon_elevation"
+ top_delta="13"
+ width="215"
+ can_edit_text="true"/>
+ <text
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-5"
+ top_delta="22"
+ width="200">
+ Brightness:
+ </text>
+ <slider
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.01"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="0.0"
+ max_val="1.0"
+ name="moon_brightness"
+ top_delta="13"
+ width="215"
+ can_edit_text="true"/>
+ <check_box
control_name="moonbeacon"
+ follows="left|top"
+ layout="topleft"
width="60"
height="16"
label="Show Beacon"
- layout="topleft"
name="moonbeacon"
- right="-50"
- bottom="-10"
- follows="bottom|right"/>
+ top_pad="5"
+ left_delta="-8"/>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
index 768efc2f3f..55c47c90a4 100644
--- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
@@ -6,7 +6,7 @@
bg_alpha_color="DkGray">
<accordion
follows="left|top|right|bottom"
- height="373"
+ height="400"
layout="topleft"
left="3"
top="0"
@@ -147,37 +147,4 @@
</flat_list_view>
</accordion_tab>
</accordion>
- <panel
- background_visible="true"
- bevel_style="none"
- bottom="0"
- follows="left|right|bottom"
- height="27"
- layout="bottomleft"
- left="3"
- name="bottom_panel"
- width="313">
- <menu_button
- follows="bottom|left"
- tool_tip="Show additional options"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="gear_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_icon"
- width="273"
- />
- </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 440e8b140f..f604a16b0b 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2296,9 +2296,9 @@ For AI Character: Get the closest navigable point to the point provided.
<!-- inventory -->
<string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string>
- <string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters].</string>
- <string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string>
- <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
+ <string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters].</string>
+ <string name="PlacesNoMatchingItems">To add a place to your landmarks, click the star to the right of the location name.</string>
+ <string name="FavoritesNoMatchingItems">To add a place to your favorites bar, click the star to the right of the location name.</string>
<string name="MarketplaceNoListing">You have no listings yet.</string>
<string name="MarketplaceNoMatchingItems">No items found. Check the spelling of your search string and try again.</string>
<string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string>
@@ -2418,6 +2418,7 @@ If you continue to receive this message, please contact Second Life support for
<string name="Scripts" value=" Scripts," />
<string name="Sounds" value=" Sounds," />
<string name="Textures" value=" Textures," />
+ <string name="Settings" value=" Settings," />
<string name="Snapshots" value=" Snapshots," />
<string name="No Filters" value="No " />
<string name="Since Logoff" value=" - Since Logoff" />
@@ -2835,7 +2836,6 @@ If you continue to receive this message, please contact Second Life support for
<string name="AcquiredItems">Acquired Items</string>
<string name="Cancel">Cancel</string>
<string name="UploadingCosts">Uploading [NAME] costs L$ [AMOUNT]</string>
- <string name="BuyingCosts">Buying this costs L$ [AMOUNT]</string>
<string name="UnknownFileExtension">
Unknown file extension .%s
Expected .wav, .tga, .bmp, .jpg, .jpeg, or .anim
@@ -3759,6 +3759,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="unread_chat_multiple">
[SOURCES] have said something new
</string>
+ <string name="teleport_preamble_compact_chat">
+ You are now at
+ </string>
<string name="session_initialization_timed_out_error">
The session initialization is timed out
</string>
@@ -3768,6 +3771,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="voice_morphing_url">https://secondlife.com/destination/voice-island</string>
<string name="premium_voice_morphing_url">https://secondlife.com/destination/voice-morphing-premium</string>
+ <string name="lindenhomes_get_home_url">https://secondlife.com/land/lindenhomes/member.php</string>
+ <string name="lindenhomes_my_home_url">https://land.secondlife.com/en-Us/lindenhomes/my-home.php</string>
+ <string name="membership_url">https://secondlife.com/my/account/membership.php</string>
+
<!-- Financial operations strings -->
<string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT] [REASON].</string>
<string name="paid_you_ldollars_gift">[NAME] paid you L$[AMOUNT]: [REASON]</string>
@@ -3791,11 +3798,12 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="to upload">to upload</string>
<string name="to publish a classified ad">to publish a classified ad</string>
- <string name="giving">Giving L$ [AMOUNT]</string>
<string name="uploading_costs">Uploading costs L$ [AMOUNT]</string>
<string name="this_costs">This costs L$ [AMOUNT]</string>
- <string name="buying_selected_land">Buying selected land for L$ [AMOUNT]</string>
- <string name="this_object_costs">This object costs L$ [AMOUNT]</string>
+
+ <string name="buying_selected_land">This land costs</string>
+ <string name="this_object_costs">This item costs</string>
+ <string name="giving">You want to give</string>
<string name="group_role_everyone">Everyone</string>
<string name="group_role_officers">Officers</string>
@@ -3958,6 +3966,9 @@ Please check http://status.secondlifegrid.net to see if there is a known problem
<string name="Premium PlusMembership">Premium Plus</string>
<string name="InternalMembership">Internal</string> <!-- No need to translate -->
+ <string name="MembershipUpgradeText">Upgrade to Premium</string>
+ <string name="MembershipPremiumText">My Premium membership</string>
+
<!-- Question strings for delete items notifications -->
<string name="DeleteItems">Delete selected items?</string>
<string name="DeleteItem">Delete selected item?</string>
@@ -4114,8 +4125,8 @@ Try enclosing path to the editor with double quotes.
<!-- commands -->
<string name="Command_AboutLand_Label">About land</string>
- <string name="Command_Appearance_Label">Appearance</string>
- <string name="Command_Avatar_Label">Avatar</string>
+ <string name="Command_Appearance_Label">Outfits</string>
+ <string name="Command_Avatar_Label">Complete avatars</string>
<string name="Command_Build_Label">Build</string>
<string name="Command_Chat_Label">Chat</string>
<string name="Command_Conversations_Label">Conversations</string>
@@ -4124,7 +4135,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Environments_Label">My Environments</string>
<string name="Command_Gestures_Label">Gestures</string>
<string name="Command_Grid_Status_Label">Grid status</string>
- <string name="Command_HowTo_Label">How to</string>
+ <string name="Command_HowTo_Label">Guidebook</string>
<string name="Command_Inventory_Label">Inventory</string>
<string name="Command_Map_Label">Map</string>
<string name="Command_Marketplace_Label">Marketplace</string>
diff --git a/indra/newview/skins/default/xui/en/teleport_strings.xml b/indra/newview/skins/default/xui/en/teleport_strings.xml
index 57f8bb542d..1456114b25 100644
--- a/indra/newview/skins/default/xui/en/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/en/teleport_strings.xml
@@ -2,8 +2,7 @@
<teleport_messages>
<message_set name="errors">
<message name="invalid_tport">
- Problem encountered processing your teleport request. You may need to log back in before you can teleport.
-If you continue to get this message, please check the [SUPPORT_SITE].
+ Teleport attempts are limited to 6 per minute. If you are having trouble, wait one minute and try teleporting again. If the problem persists, log out and log in again.
</message>
<message name="invalid_region_handoff">
Problem encountered processing your region crossing. You may need to log back in before you can cross regions.
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
index 2cc4abdd30..1c4822b8d5 100644
--- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -6,9 +6,11 @@
text_pad_left="7"
select_on_focus="true"
text_tentative_color="TextFgTentativeColor"
+ highlight_text_field="false"
background_image="TextField_Search_Off"
background_image_disabled="TextField_Search_Disabled"
- background_image_focused="TextField_Search_Active">
+ background_image_focused="TextField_Search_Active"
+ background_image_highlight="TextField_Search_Highlight">
<search_button label=""
top_pad="4"
left_pad="4"
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index faa0404b35..dc5a07bf4f 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -7,9 +7,11 @@
text_pad_right="6"
select_on_focus="true"
text_tentative_color="TextFgTentativeColor"
+ highlight_text_field="false"
background_image="TextField_Search_Off"
background_image_disabled="TextField_Search_Disabled"
- background_image_focused="TextField_Search_Active" >
+ background_image_focused="TextField_Search_Active"
+ background_image_highlight="TextField_Search_Highlight">
<search_button
top_pad="4"
left_pad="4"