summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2010-11-01 15:19:50 -0700
committerMark Palange (Mani) <palange@lindenlab.com>2010-11-01 15:19:50 -0700
commit9b457982305c624468aa32e06a1c0df713d0b53c (patch)
treef6a8787782355e3ea083326ff3e1ea4ad4bc8873
parent6ab2e44e945ddc085a7b4b5f1524de924419a897 (diff)
parent42b49397d2347b6a97394ce0b35efe5cc2ab44a2 (diff)
Merge
-rw-r--r--doc/contributions.txt5
-rw-r--r--indra/cmake/FMOD.cmake6
-rw-r--r--indra/llaudio/CMakeLists.txt5
-rw-r--r--indra/llaudio/llvorbisencode.cpp7
-rw-r--r--indra/llaudio/llvorbisencode.h1
-rw-r--r--indra/llmessage/llcachename.cpp27
-rw-r--r--indra/llmessage/llcachename.h6
-rw-r--r--indra/llrender/llgl.cpp26
-rw-r--r--indra/llrender/llgl.h7
-rw-r--r--indra/llrender/llglheaders.h10
-rw-r--r--indra/llui/llmenubutton.cpp100
-rw-r--r--indra/llui/llmenubutton.h19
-rw-r--r--indra/llui/lltextbase.cpp34
-rw-r--r--indra/llui/lltoggleablemenu.cpp18
-rw-r--r--indra/llui/lltoggleablemenu.h5
-rw-r--r--indra/llui/llurlentry.cpp5
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/featuretable.txt6
-rw-r--r--indra/newview/featuretable_xp.txt6
-rw-r--r--indra/newview/installers/windows/installer_template.nsi2
-rw-r--r--indra/newview/llagentcamera.cpp7
-rw-r--r--indra/newview/llchathistory.cpp52
-rw-r--r--indra/newview/lldrawable.cpp1
-rw-r--r--indra/newview/lldrawpool.cpp1
-rw-r--r--indra/newview/lldrawpool.h1
-rw-r--r--indra/newview/lldrawpoolground.cpp2
-rw-r--r--indra/newview/lldrawpoolsky.cpp2
-rw-r--r--indra/newview/lldrawpoolwater.cpp28
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp2
-rw-r--r--indra/newview/llfloatergodtools.cpp18
-rw-r--r--indra/newview/llfloaterworldmap.cpp2
-rw-r--r--indra/newview/llgiveinventory.cpp4
-rw-r--r--indra/newview/llimview.cpp31
-rw-r--r--indra/newview/llinspectavatar.cpp5
-rw-r--r--indra/newview/llinspectobject.cpp3
-rw-r--r--indra/newview/llinventorybridge.cpp87
-rw-r--r--indra/newview/llinventoryfunctions.cpp5
-rw-r--r--indra/newview/llinventoryicon.cpp4
-rw-r--r--indra/newview/llinventorypanel.cpp5
-rw-r--r--indra/newview/lllogchat.cpp157
-rw-r--r--indra/newview/lllogchat.h40
-rw-r--r--indra/newview/llnearbychat.cpp56
-rw-r--r--indra/newview/llnearbychathandler.cpp58
-rw-r--r--indra/newview/lloutfitslist.cpp44
-rw-r--r--indra/newview/lloutfitslist.h2
-rw-r--r--indra/newview/llpanelgrouproles.cpp111
-rw-r--r--indra/newview/llpanelgrouproles.h6
-rw-r--r--indra/newview/llpanellandmarks.cpp7
-rw-r--r--indra/newview/llpanellandmarks.h5
-rw-r--r--indra/newview/llpanelmaininventory.cpp3
-rw-r--r--indra/newview/llpanelmaininventory.h3
-rw-r--r--indra/newview/llpaneloutfitedit.cpp11
-rw-r--r--indra/newview/llpaneloutfitedit.h4
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp10
-rw-r--r--indra/newview/llpaneloutfitsinventory.h1
-rw-r--r--indra/newview/llpanelpeople.cpp9
-rw-r--r--indra/newview/llpanelteleporthistory.cpp3
-rw-r--r--indra/newview/llpanelwearing.cpp10
-rw-r--r--indra/newview/llplacesinventorypanel.cpp18
-rw-r--r--indra/newview/llplacesinventorypanel.h6
-rw-r--r--indra/newview/llscreenchannel.cpp8
-rw-r--r--indra/newview/llspatialpartition.cpp25
-rw-r--r--indra/newview/llspatialpartition.h7
-rw-r--r--indra/newview/llsurface.cpp5
-rw-r--r--indra/newview/lltoast.cpp110
-rw-r--r--indra/newview/lltoast.h35
-rw-r--r--indra/newview/llviewerdisplay.cpp3
-rw-r--r--indra/newview/llviewermenu.cpp78
-rw-r--r--indra/newview/llviewermessage.cpp15
-rw-r--r--indra/newview/llviewerobject.cpp4
-rw-r--r--indra/newview/llviewerobject.h22
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/llviewerregion.h1
-rw-r--r--indra/newview/llviewershadermgr.cpp4
-rw-r--r--indra/newview/llviewerwindow.cpp5
-rw-r--r--indra/newview/llvosurfacepatch.cpp2
-rw-r--r--indra/newview/llvowater.cpp16
-rw-r--r--indra/newview/llvowater.h14
-rw-r--r--indra/newview/llworld.cpp353
-rw-r--r--indra/newview/llworld.h1
-rw-r--r--indra/newview/pipeline.cpp45
-rw-r--r--indra/newview/pipeline.h1
-rw-r--r--indra/newview/skins/default/xui/da/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/de/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/en/alert_line_editor.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_currency.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_god_tools.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_outfit_save_as.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_pay.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_pay_object.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_post_process.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_postcard.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_animation.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_gesture.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_notecard.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_texture.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_report_abuse.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_script_preview.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_sound_preview.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_ui_preview.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_world_map.xml12
-rw-r--r--indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_cof_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_gesture_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_folder.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml12
-rw-r--r--indra/newview/skins/default/xui/en/menu_wearing_gear.xml4
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_classified.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_gloves.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_jacket.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pants.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_shirt.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_shoes.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_skirt.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_socks.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_underpants.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_undershirt.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml34
-rw-r--r--indra/newview/skins/default/xui/en/panel_prim_media_controls.xml2
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_item_info.xml4
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml4
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml5
-rw-r--r--indra/newview/skins/default/xui/es/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/it/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/nl/notifications.xml16
-rw-r--r--indra/newview/skins/default/xui/nl/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/strings.xml2
156 files changed, 1525 insertions, 681 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 16327d0917..b3d30c3a54 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -69,9 +69,11 @@ Aleric Inglewood
VWR-10759
VWR-10837
VWR-12691
+ VWR-12984
VWR-13996
VWR-14426
SNOW-84
+ SNOW-477
SNOW-766
STORM-163
Ales Beaumont
@@ -174,6 +176,7 @@ Boroondas Gupte
VWR-233
VWR-20583
VWR-20891
+ VWR-23455
WEB-262
Bulli Schumann
CT-218
@@ -591,6 +594,8 @@ Salahzar Stenvaag
CT-321
Sammy Frederix
VWR-6186
+Satomi Ahn
+ STORM-501
Scrippy Scofield
VWR-3748
Seg Baphomet
diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake
index 96434e38fa..dcf44cd642 100644
--- a/indra/cmake/FMOD.cmake
+++ b/indra/cmake/FMOD.cmake
@@ -7,8 +7,10 @@ if (FMOD)
set(FMOD_FIND_REQUIRED ON)
include(FindFMOD)
else (STANDALONE)
- include(Prebuilt)
- use_prebuilt_binary(fmod)
+ if (INSTALL_PROPRIETARY)
+ include(Prebuilt)
+ use_prebuilt_binary(fmod)
+ endif (INSTALL_PROPRIETARY)
if (WINDOWS)
set(FMOD_LIBRARY fmod)
diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt
index e869b9717c..21ec622819 100644
--- a/indra/llaudio/CMakeLists.txt
+++ b/indra/llaudio/CMakeLists.txt
@@ -14,7 +14,6 @@ include(LLVFS)
include_directories(
${LLAUDIO_INCLUDE_DIRS}
- ${FMOD_INCLUDE_DIR}
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
@@ -45,6 +44,10 @@ set(llaudio_HEADER_FILES
)
if (FMOD)
+ include_directories(
+ ${FMOD_INCLUDE_DIR}
+ )
+
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmod.cpp
lllistener_fmod.cpp
diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp
index 9f479189d7..0e0c80a456 100644
--- a/indra/llaudio/llvorbisencode.cpp
+++ b/indra/llaudio/llvorbisencode.cpp
@@ -120,6 +120,13 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
+ ((U32) wav_header[5] << 8)
+ wav_header[4];
+ if (chunk_length > physical_file_size - file_pos - 4)
+ {
+ infile.close();
+ error_msg = "SoundFileInvalidChunkSize";
+ return(LLVORBISENC_CHUNK_SIZE_ERR);
+ }
+
// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))
diff --git a/indra/llaudio/llvorbisencode.h b/indra/llaudio/llvorbisencode.h
index d33aacf1ea..6b22a2cb59 100644
--- a/indra/llaudio/llvorbisencode.h
+++ b/indra/llaudio/llvorbisencode.h
@@ -38,6 +38,7 @@ const S32 LLVORBISENC_MULTICHANNEL_ERR = 7; // can't do stereo
const S32 LLVORBISENC_UNSUPPORTED_SAMPLE_RATE = 8; // unsupported sample rate
const S32 LLVORBISENC_UNSUPPORTED_WORD_SIZE = 9; // unsupported word size
const S32 LLVORBISENC_CLIP_TOO_LONG = 10; // source file is too long
+const S32 LLVORBISENC_CHUNK_SIZE_ERR = 11; // chunk size is wrong
const F32 LLVORBIS_CLIP_MAX_TIME = 10.0f;
const U8 LLVORBIS_CLIP_MAX_CHANNELS = 2;
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 4a66a31c35..522b99bc02 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -38,6 +38,8 @@
#include "message.h"
#include "llmemtype.h"
+#include <boost/regex.hpp>
+
// llsd serialization constants
static const std::string AGENTS("agents");
static const std::string GROUPS("groups");
@@ -551,6 +553,31 @@ std::string LLCacheName::buildUsername(const std::string& full_name)
return full_name;
}
+//static
+std::string LLCacheName::buildLegacyName(const std::string& complete_name)
+{
+ boost::regex complete_name_regex("(.+)( \\()([A-Za-z]+)(.[A-Za-z]+)*(\\))");
+ boost::match_results<std::string::const_iterator> name_results;
+ if (!boost::regex_match(complete_name, name_results, complete_name_regex)) return complete_name;
+
+ std::string legacy_name = name_results[3];
+ // capitalize the first letter
+ std::string cap_letter = legacy_name.substr(0, 1);
+ LLStringUtil::toUpper(cap_letter);
+ legacy_name = cap_letter + legacy_name.substr(1);
+
+ if (name_results[4].matched)
+ {
+ std::string last_name = name_results[4];
+ std::string cap_letter = last_name.substr(1, 1);
+ LLStringUtil::toUpper(cap_letter);
+ last_name = cap_letter + last_name.substr(2);
+ legacy_name = legacy_name + " " + last_name;
+ }
+
+ return legacy_name;
+}
+
// This is a little bit kludgy. LLCacheNameCallback is a slot instead of a function pointer.
// The reason it is a slot is so that the legacy get() function below can bind an old callback
// and pass it as a slot. The reason it isn't a boost::function is so that trackable behavior
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h
index b469803060..b108e37157 100644
--- a/indra/llmessage/llcachename.h
+++ b/indra/llmessage/llcachename.h
@@ -90,6 +90,12 @@ public:
// "Random Linden" -> "random.linden"
static std::string buildUsername(const std::string& name);
+ // Converts a complete display name to a legacy name
+ // if possible, otherwise returns the input
+ // "Alias (random.linden)" -> "Random Linden"
+ // "Something random" -> "Something random"
+ static std::string buildLegacyName(const std::string& name);
+
// If available, this method copies the group name into the string
// provided. The caller must allocate at least
// DB_GROUP_NAME_BUF_SIZE characters. If not available, this
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index c0edd92bc1..096e8e07ab 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -610,41 +610,46 @@ void LLGLManager::shutdownGL()
void LLGLManager::initExtensions()
{
#if LL_MESA_HEADLESS
-# if GL_ARB_multitexture
+# ifdef GL_ARB_multitexture
mHasMultitexture = TRUE;
# else
mHasMultitexture = FALSE;
# endif
-# if GL_ARB_texture_env_combine
+# ifdef GL_ARB_texture_env_combine
mHasARBEnvCombine = TRUE;
# else
mHasARBEnvCombine = FALSE;
# endif
-# if GL_ARB_texture_compression
+# ifdef GL_ARB_texture_compression
mHasCompressedTextures = TRUE;
# else
mHasCompressedTextures = FALSE;
# endif
-# if GL_ARB_vertex_buffer_object
+# ifdef GL_ARB_vertex_buffer_object
mHasVertexBufferObject = TRUE;
# else
mHasVertexBufferObject = FALSE;
# endif
-# if GL_EXT_framebuffer_object
+# ifdef GL_EXT_framebuffer_object
mHasFramebufferObject = TRUE;
# else
mHasFramebufferObject = FALSE;
# endif
-# if GL_EXT_framebuffer_multisample
+# ifdef GL_EXT_framebuffer_multisample
mHasFramebufferMultisample = TRUE;
# else
mHasFramebufferMultisample = FALSE;
# endif
-# if GL_ARB_draw_buffers
+# ifdef GL_ARB_draw_buffers
mHasDrawBuffers = TRUE;
#else
mHasDrawBuffers = FALSE;
# endif
+# if defined(GL_NV_depth_clamp) || defined(GL_ARB_depth_clamp)
+ mHasDepthClamp = TRUE;
+#else
+ mHasDepthClamp = FALSE;
+#endif
# if GL_EXT_blend_func_separate
mHasBlendFuncSeparate = TRUE;
#else
@@ -671,6 +676,7 @@ void LLGLManager::initExtensions()
mHasCompressedTextures = glh_init_extensions("GL_ARB_texture_compression");
mHasOcclusionQuery = ExtensionExists("GL_ARB_occlusion_query", gGLHExts.mSysExts);
mHasVertexBufferObject = ExtensionExists("GL_ARB_vertex_buffer_object", gGLHExts.mSysExts);
+ mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad
mHasFramebufferObject = ExtensionExists("GL_EXT_framebuffer_object", gGLHExts.mSysExts)
&& ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts);
@@ -694,6 +700,7 @@ void LLGLManager::initExtensions()
if (getenv("LL_GL_NOEXT"))
{
//mHasMultitexture = FALSE; // NEEDED!
+ mHasDepthClamp = FALSE;
mHasARBEnvCombine = FALSE;
mHasCompressedTextures = FALSE;
mHasVertexBufferObject = FALSE;
@@ -755,6 +762,7 @@ void LLGLManager::initExtensions()
if (strchr(blacklist,'s')) mHasFramebufferMultisample = FALSE;
if (strchr(blacklist,'t')) mHasTextureRectangle = FALSE;
if (strchr(blacklist,'u')) mHasBlendFuncSeparate = FALSE;//S
+ if (strchr(blacklist,'v')) mHasDepthClamp = FALSE;
}
#endif // LL_LINUX || LL_SOLARIS
@@ -2037,7 +2045,7 @@ void LLGLDepthTest::checkState()
}
}
-LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P)
+LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P)
{
for (U32 i = 0; i < 4; i++)
{
@@ -2050,7 +2058,7 @@ LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P)
glMatrixMode(GL_MODELVIEW);
}
-LLGLClampToFarClip::~LLGLClampToFarClip()
+LLGLSquashToFarClip::~LLGLSquashToFarClip()
{
glMatrixMode(GL_PROJECTION);
glPopMatrix();
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 5e8965c06a..b0decc1499 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -92,6 +92,7 @@ public:
BOOL mHasOcclusionQuery;
BOOL mHasPointParameters;
BOOL mHasDrawBuffers;
+ BOOL mHasDepthClamp;
BOOL mHasTextureRectangle;
// Other extensions.
@@ -315,11 +316,11 @@ private:
leaves this class.
Does not stack.
*/
-class LLGLClampToFarClip
+class LLGLSquashToFarClip
{
public:
- LLGLClampToFarClip(glh::matrix4f projection);
- ~LLGLClampToFarClip();
+ LLGLSquashToFarClip(glh::matrix4f projection);
+ ~LLGLSquashToFarClip();
};
/*
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index 5a34b46d0c..576969b81a 100644
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
@@ -829,5 +829,15 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
#endif // LL_MESA / LL_WINDOWS / LL_DARWIN
+// Even when GL_ARB_depth_clamp is available in the driver, the (correct)
+// headers, and therefore GL_DEPTH_CLAMP might not be defined.
+// In that case GL_DEPTH_CLAMP_NV should be defined, but why not just
+// use the known numeric.
+//
+// To avoid #ifdef's in the code. Just define this here.
+#ifndef GL_DEPTH_CLAMP
+// Probably (still) called GL_DEPTH_CLAMP_NV.
+#define GL_DEPTH_CLAMP 0x864F
+#endif
#endif // LL_LLGLHEADERS_H
diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp
index c1b5efaa72..ac568a83e4 100644
--- a/indra/llui/llmenubutton.cpp
+++ b/indra/llui/llmenubutton.cpp
@@ -29,7 +29,7 @@
#include "llmenubutton.h"
// Linden library includes
-#include "llmenugl.h"
+#include "lltoggleablemenu.h"
#include "llstring.h"
#include "v4color.h"
@@ -44,22 +44,26 @@ LLMenuButton::Params::Params()
LLMenuButton::LLMenuButton(const LLMenuButton::Params& p)
: LLButton(p),
- mMenu(NULL),
- mMenuVisibleLastFrame(false),
+ mIsMenuShown(false),
mMenuPosition(MP_BOTTOM_LEFT)
{
std::string menu_filename = p.menu_filename;
if (!menu_filename.empty())
{
- mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance());
- if (!mMenu)
+ LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance());
+ if (!menu)
{
llwarns << "Error loading menu_button menu" << llendl;
+ return;
}
- }
- updateMenuOrigin();
+ menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2));
+
+ mMenuHandle = menu->getHandle();
+
+ updateMenuOrigin();
+ }
}
boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_signal_t::slot_type& cb )
@@ -69,34 +73,34 @@ boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_sign
void LLMenuButton::hideMenu()
{
- if(!mMenu) return;
- mMenu->setVisible(FALSE);
+ if(mMenuHandle.isDead()) return;
+
+ LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
+ if (menu)
+ {
+ menu->setVisible(FALSE);
+ }
}
-void LLMenuButton::setMenu(LLMenuGL* menu, EMenuPosition position /*MP_TOP_LEFT*/)
+LLToggleableMenu* LLMenuButton::getMenu()
{
- mMenu = menu;
- mMenuPosition = position;
+ return dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
}
-void LLMenuButton::draw()
+void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_TOP_LEFT*/)
{
- //we save this off so next frame when we try to close it by
- //button click, and it hides menus before we get to it, we know
- mMenuVisibleLastFrame = mMenu && mMenu->getVisible();
-
- if (mMenuVisibleLastFrame)
- {
- setForcePressedState(true);
- }
+ if (!menu) return;
- LLButton::draw();
+ mMenuHandle = menu->getHandle();
+ mMenuPosition = position;
- setForcePressedState(false);
+ menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2));
}
BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
{
+ if (mMenuHandle.isDead()) return FALSE;
+
if( KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key))
{
// *HACK: We emit the mouse down signal to fire the callback bound to the
@@ -107,9 +111,10 @@ BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
return TRUE;
}
- if (mMenu && mMenu->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE)
+ LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
+ if (menu && menu->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE)
{
- mMenu->setVisible(FALSE);
+ menu->setVisible(FALSE);
return TRUE;
}
@@ -119,6 +124,7 @@ BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLButton::handleMouseDown(x, y, mask);
+
toggleMenu();
return TRUE;
@@ -126,28 +132,38 @@ BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask)
void LLMenuButton::toggleMenu()
{
- if(!mMenu) return;
+ if(mMenuHandle.isDead()) return;
+
+ LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
+ if (!menu) return;
- if (mMenu->getVisible() || mMenuVisibleLastFrame)
+ // Store the button rectangle to toggle menu visibility if a mouse event
+ // occurred inside or outside the button rect.
+ menu->setButtonRect(this);
+
+ if (!menu->toggleVisibility() && mIsMenuShown)
{
- mMenu->setVisible(FALSE);
+ setForcePressedState(false);
+ mIsMenuShown = false;
}
else
{
- mMenu->buildDrawLabels();
- mMenu->arrangeAndClear();
- mMenu->updateParent(LLMenuGL::sMenuContainer);
+ menu->buildDrawLabels();
+ menu->arrangeAndClear();
+ menu->updateParent(LLMenuGL::sMenuContainer);
updateMenuOrigin();
- //mMenu->needsArrange(); //so it recalculates the visible elements
- LLMenuGL::showPopup(getParent(), mMenu, mX, mY);
+ LLMenuGL::showPopup(getParent(), menu, mX, mY);
+
+ setForcePressedState(true);
+ mIsMenuShown = true;
}
}
void LLMenuButton::updateMenuOrigin()
{
- if (!mMenu) return;
+ if (mMenuHandle.isDead()) return;
LLRect rect = getRect();
@@ -156,7 +172,7 @@ void LLMenuButton::updateMenuOrigin()
case MP_TOP_LEFT:
{
mX = rect.mLeft;
- mY = rect.mTop + mMenu->getRect().getHeight();
+ mY = rect.mTop + mMenuHandle.get()->getRect().getHeight();
break;
}
case MP_BOTTOM_LEFT:
@@ -167,3 +183,17 @@ void LLMenuButton::updateMenuOrigin()
}
}
}
+
+void LLMenuButton::onMenuVisibilityChange(const LLSD& param)
+{
+ bool new_visibility = param["visibility"].asBoolean();
+ bool is_closed_by_button_click = param["closed_by_button_click"].asBoolean();
+
+ // Reset the button "pressed" state only if the menu is shown by this particular
+ // menu button (not any other control) and is not being closed by a click on the button.
+ if (!new_visibility && !is_closed_by_button_click && mIsMenuShown)
+ {
+ setForcePressedState(false);
+ mIsMenuShown = false;
+ }
+}
diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h
index 81c3592b16..9e91b9e99d 100644
--- a/indra/llui/llmenubutton.h
+++ b/indra/llui/llmenubutton.h
@@ -29,7 +29,7 @@
#include "llbutton.h"
-class LLMenuGL;
+class LLToggleableMenu;
class LLMenuButton
: public LLButton
@@ -52,14 +52,13 @@ public:
boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb );
- /*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask );
void hideMenu();
- LLMenuGL* getMenu() { return mMenu; }
- void setMenu(LLMenuGL* menu, EMenuPosition position = MP_TOP_LEFT);
+ LLToggleableMenu* getMenu();
+ void setMenu(LLToggleableMenu* menu, EMenuPosition position = MP_TOP_LEFT);
void setMenuPosition(EMenuPosition position) { mMenuPosition = position; }
@@ -70,12 +69,14 @@ protected:
void toggleMenu();
void updateMenuOrigin();
+ void onMenuVisibilityChange(const LLSD& param);
+
private:
- LLMenuGL* mMenu;
- bool mMenuVisibleLastFrame;
- EMenuPosition mMenuPosition;
- S32 mX;
- S32 mY;
+ LLHandle<LLView> mMenuHandle;
+ bool mIsMenuShown;
+ EMenuPosition mMenuPosition;
+ S32 mX;
+ S32 mY;
};
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 758df418e8..5721df6b36 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2214,19 +2214,39 @@ bool LLTextBase::scrolledToEnd()
return mScroller->isAtBottom();
}
-
bool LLTextBase::setCursor(S32 row, S32 column)
{
- if (0 <= row && row < (S32)mLineInfoList.size())
+ if (row < 0 || column < 0) return false;
+
+ S32 n_lines = mLineInfoList.size();
+ for (S32 line = row; line < n_lines; ++line)
{
- S32 doc_pos = mLineInfoList[row].mDocIndexStart;
- column = llclamp(column, 0, mLineInfoList[row].mDocIndexEnd - mLineInfoList[row].mDocIndexStart - 1);
- doc_pos += column;
- updateCursorXPos();
+ const line_info& li = mLineInfoList[line];
+
+ if (li.mLineNum < row)
+ {
+ continue;
+ }
+ else if (li.mLineNum > row)
+ {
+ break; // invalid column specified
+ }
+
+ // Found the given row.
+ S32 line_length = li.mDocIndexEnd - li.mDocIndexStart;;
+ if (column >= line_length)
+ {
+ column -= line_length;
+ continue;
+ }
+ // Found the given column.
+ updateCursorXPos();
+ S32 doc_pos = li.mDocIndexStart + column;
return setCursorPos(doc_pos);
}
- return false;
+
+ return false; // invalid row or column specified
}
diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp
index 0eb2dc1387..d29260750f 100644
--- a/indra/llui/lltoggleablemenu.cpp
+++ b/indra/llui/lltoggleablemenu.cpp
@@ -35,10 +35,22 @@ static LLDefaultChildRegistry::Register<LLToggleableMenu> r("toggleable_menu");
LLToggleableMenu::LLToggleableMenu(const LLToggleableMenu::Params& p)
: LLMenuGL(p),
mButtonRect(),
+ mVisibilityChangeSignal(NULL),
mClosedByButtonClick(false)
{
}
+LLToggleableMenu::~LLToggleableMenu()
+{
+ delete mVisibilityChangeSignal;
+}
+
+boost::signals2::connection LLToggleableMenu::setVisibilityChangeCallback(const commit_signal_t::slot_type& cb)
+{
+ if (!mVisibilityChangeSignal) mVisibilityChangeSignal = new commit_signal_t();
+ return mVisibilityChangeSignal->connect(cb);
+}
+
// virtual
void LLToggleableMenu::handleVisibilityChange (BOOL curVisibilityIn)
{
@@ -49,6 +61,12 @@ void LLToggleableMenu::handleVisibilityChange (BOOL curVisibilityIn)
{
mClosedByButtonClick = true;
}
+
+ if (mVisibilityChangeSignal)
+ {
+ (*mVisibilityChangeSignal)(this,
+ LLSD().with("visibility", curVisibilityIn).with("closed_by_button_click", mClosedByButtonClick));
+ }
}
void LLToggleableMenu::setButtonRect(const LLRect& rect, LLView* current_view)
diff --git a/indra/llui/lltoggleablemenu.h b/indra/llui/lltoggleablemenu.h
index f036cdfffb..2094bd776f 100644
--- a/indra/llui/lltoggleablemenu.h
+++ b/indra/llui/lltoggleablemenu.h
@@ -41,6 +41,10 @@ protected:
LLToggleableMenu(const Params&);
friend class LLUICtrlFactory;
public:
+ ~LLToggleableMenu();
+
+ boost::signals2::connection setVisibilityChangeCallback( const commit_signal_t::slot_type& cb );
+
virtual void handleVisibilityChange (BOOL curVisibilityIn);
const LLRect& getButtonRect() const { return mButtonRect; }
@@ -57,6 +61,7 @@ public:
protected:
bool mClosedByButtonClick;
LLRect mButtonRect;
+ commit_signal_t* mVisibilityChangeSignal;
};
#endif // LL_LLTOGGLEABLEMENU_H
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index f58c07754f..84678ef4db 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -972,7 +972,7 @@ std::string LLUrlEntryWorldMap::getLocation(const std::string &url) const
//
LLUrlEntryNoLink::LLUrlEntryNoLink()
{
- mPattern = boost::regex("<nolink>[^<]*</nolink>",
+ mPattern = boost::regex("<nolink>.*</nolink>",
boost::regex::perl|boost::regex::icase);
}
@@ -989,7 +989,8 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC
LLStyle::Params LLUrlEntryNoLink::getStyle() const
{
- return LLStyle::Params();
+ // Don't render as URL (i.e. no context menu or hand cursor).
+ return LLStyle::Params().is_link(false);
}
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 96d4fb1295..7f3d4bc4e2 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12167,5 +12167,16 @@
<key>Value</key>
<real>300.0</real>
</map>
+ <key>GroupMembersSortOrder</key>
+ <map>
+ <key>Comment</key>
+ <string>The order by which group members will be sorted (name|donated|online)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>name</string>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index b09dd699ba..d69842d5f1 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 23
+version 25
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -144,7 +144,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Ultra graphics (REALLY PURTY!)
@@ -171,7 +171,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index 1e83bc73a5..dae7705971 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -1,4 +1,4 @@
-version 23
+version 25
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -144,7 +144,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Ultra graphics (REALLY PURTY!)
@@ -171,7 +171,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index d1cd335783..d5712f80cf 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -52,7 +52,7 @@ LangString LanguageCode ${LANG_JAPANESE} "ja"
LangString LanguageCode ${LANG_ITALIAN} "it"
LangString LanguageCode ${LANG_KOREAN} "ko"
LangString LanguageCode ${LANG_DUTCH} "nl"
-LangString LanguageCode ${LANG_POLISH} "da"
+LangString LanguageCode ${LANG_POLISH} "pl"
LangString LanguageCode ${LANG_PORTUGUESEBR} "pt"
LangString LanguageCode ${LANG_SIMPCHINESE} "zh"
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 68e408d3e4..7c953cd2dc 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -296,8 +296,11 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
LLSelectMgr::getInstance()->deselectAll();
}
- // Hide all popup menus
- gMenuHolder->hideMenus();
+ if (gMenuHolder != NULL)
+ {
+ // Hide all popup menus
+ gMenuHolder->hideMenus();
+ }
}
if (change_camera && !gSavedSettings.getBOOL("FreezeTime"))
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 378c4358b3..3dc6e786d3 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -54,6 +54,7 @@
#include "llviewertexteditor.h"
#include "llworld.h"
#include "lluiconstants.h"
+#include "llstring.h"
#include "llviewercontrol.h"
@@ -260,7 +261,7 @@ public:
if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM && chat.mFromID.isNull())
{
mSourceType = CHAT_SOURCE_SYSTEM;
- }
+ }
mUserNameFont = style_params.font();
LLTextBox* user_name = getChild<LLTextBox>("user_name");
@@ -268,14 +269,14 @@ public:
user_name->setColor(style_params.color());
if (chat.mFromName.empty()
- || mSourceType == CHAT_SOURCE_SYSTEM
- || mAvatarID.isNull())
+ || mSourceType == CHAT_SOURCE_SYSTEM)
{
mFrom = LLTrans::getString("SECOND_LIFE");
user_name->setValue(mFrom);
updateMinUserNameWidth();
}
else if (mSourceType == CHAT_SOURCE_AGENT
+ && !mAvatarID.isNull()
&& chat.mChatStyle != CHAT_STYLE_HISTORY)
{
// ...from a normal user, lookup the name and fill in later.
@@ -288,7 +289,41 @@ public:
LLAvatarNameCache::get(mAvatarID,
boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
}
- else {
+ else if (chat.mChatStyle == CHAT_STYLE_HISTORY ||
+ mSourceType == CHAT_SOURCE_AGENT)
+ {
+ //if it's an avatar name with a username add formatting
+ S32 username_start = chat.mFromName.rfind(" (");
+ S32 username_end = chat.mFromName.rfind(')');
+
+ if (username_start != std::string::npos &&
+ username_end == (chat.mFromName.length() - 1))
+ {
+ mFrom = chat.mFromName.substr(0, username_start);
+ user_name->setValue(mFrom);
+
+ if (gSavedSettings.getBOOL("NameTagShowUsernames"))
+ {
+ std::string username = chat.mFromName.substr(username_start + 2);
+ username = username.substr(0, username.length() - 1);
+ LLStyle::Params style_params_name;
+ LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
+ style_params_name.color(userNameColor);
+ style_params_name.font.name("SansSerifSmall");
+ style_params_name.font.style("NORMAL");
+ style_params_name.readonly_color(userNameColor);
+ user_name->appendText(" - " + username, FALSE, style_params_name);
+ }
+ }
+ else
+ {
+ mFrom = chat.mFromName;
+ user_name->setValue(mFrom);
+ updateMinUserNameWidth();
+ }
+ }
+ else
+ {
// ...from an object, just use name as given
mFrom = chat.mFromName;
user_name->setValue(mFrom);
@@ -367,7 +402,9 @@ public:
user_name->setValue( LLSD(av_name.mDisplayName ) );
user_name->setToolTip( av_name.mUsername );
- if (gSavedSettings.getBOOL("NameTagShowUsernames") && LLAvatarNameCache::useDisplayNames())
+ if (gSavedSettings.getBOOL("NameTagShowUsernames") &&
+ LLAvatarNameCache::useDisplayNames() &&
+ !av_name.mIsDisplayNameDefault)
{
LLStyle::Params style_params_name;
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
@@ -753,8 +790,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(style_params);
link_params.color.control = "HTMLLinkColor";
+ link_params.is_link = true;
link_params.link_href = url;
- mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter,
+ mEditor->appendText(chat.mFromName + delimiter,
false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
@@ -767,7 +805,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
}
else
{
- mEditor->appendText(chat.mFromName + delimiter, false, style_params);
+ mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter, false, style_params);
}
}
}
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 583bb54160..8106fada11 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -358,6 +358,7 @@ void LLDrawable::makeActive()
{
U32 pcode = mVObjp->getPCode();
if (pcode == LLViewerObject::LL_VO_WATER ||
+ pcode == LLViewerObject::LL_VO_VOID_WATER ||
pcode == LLViewerObject::LL_VO_SURFACE_PATCH ||
pcode == LLViewerObject::LL_VO_PART_GROUP ||
pcode == LLViewerObject::LL_VO_HUD_PART_GROUP ||
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index cb651f9d3a..ba576ff97f 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -89,6 +89,7 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0)
case POOL_SKY:
poolp = new LLDrawPoolSky();
break;
+ case POOL_VOIDWATER:
case POOL_WATER:
poolp = new LLDrawPoolWater();
break;
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 221f81ec25..e394aeaaf1 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -57,6 +57,7 @@ public:
POOL_BUMP,
POOL_INVISIBLE, // see below *
POOL_AVATAR,
+ POOL_VOIDWATER,
POOL_WATER,
POOL_GLOW,
POOL_ALPHA,
diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp
index e950fbfa82..b4dc0c26a6 100644
--- a/indra/newview/lldrawpoolground.cpp
+++ b/indra/newview/lldrawpoolground.cpp
@@ -68,7 +68,7 @@ void LLDrawPoolGround::render(S32 pass)
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- LLGLClampToFarClip far_clip(glh_get_current_projection());
+ LLGLSquashToFarClip far_clip(glh_get_current_projection());
F32 water_height = gAgent.getRegion()->getWaterHeight();
glPushMatrix();
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index d811ab8c54..9eb45a952c 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -97,7 +97,7 @@ void LLDrawPoolSky::render(S32 pass)
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- LLGLClampToFarClip far_clip(glh_get_current_projection());
+ LLGLSquashToFarClip far_clip(glh_get_current_projection());
LLGLEnable fog_enable( (mVertexShaderLevel < 1 && LLViewerCamera::getInstance()->cameraUnderWater()) ? GL_FOG : 0);
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index ce1b899d55..6126908231 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -532,6 +532,7 @@ void LLDrawPoolWater::shade()
glColor4fv(water_color.mV);
{
+ LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0);
LLGLDisable cullface(GL_CULL_FACE);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
@@ -548,30 +549,19 @@ void LLDrawPoolWater::shade()
sNeedsReflectionUpdate = TRUE;
- if (water->getUseTexture())
+ if (water->getUseTexture() || !water->getIsEdgePatch())
{
sNeedsDistortionUpdate = TRUE;
face->renderIndexed();
}
+ else if (gGLManager.mHasDepthClamp || deferred_render)
+ {
+ face->renderIndexed();
+ }
else
- { //smash background faces to far clip plane
- if (water->getIsEdgePatch())
- {
- if (deferred_render)
- {
- face->renderIndexed();
- }
- else
- {
- LLGLClampToFarClip far_clip(glh_get_current_projection());
- face->renderIndexed();
- }
- }
- else
- {
- sNeedsDistortionUpdate = TRUE;
- face->renderIndexed();
- }
+ {
+ LLGLSquashToFarClip far_clip(glh_get_current_projection());
+ face->renderIndexed();
}
}
}
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 41a299151e..eaa6aa7e37 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -260,7 +260,7 @@ void LLDrawPoolWLSky::render(S32 pass)
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
LLGLDisable clip(GL_CLIP_PLANE0);
- LLGLClampToFarClip far_clip(glh_get_current_projection());
+ LLGLSquashToFarClip far_clip(glh_get_current_projection());
renderSkyHaze(camHeightLocal);
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 662e1c4f42..a34e0353ec 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -209,13 +209,6 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
llassert(msg);
if (!msg) return;
- LLHost host = msg->getSender();
- if (host != gAgent.getRegionHost())
- {
- // update is for a different region than the one we're in
- return;
- }
-
//const S32 SIM_NAME_BUF = 256;
U32 region_flags;
U8 sim_access;
@@ -233,6 +226,8 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
S32 redirect_grid_y;
LLUUID cache_id;
+ LLHost host = msg->getSender();
+
msg->getStringFast(_PREHASH_RegionInfo, _PREHASH_SimName, sim_name);
msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_EstateID, estate_id);
msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, parent_estate_id);
@@ -242,6 +237,15 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, object_bonus_factor);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, billable_factor);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height);
+
+ if (host != gAgent.getRegionHost())
+ {
+ // Update is for a different region than the one we're in.
+ // Just check for a waterheight change.
+ LLWorld::getInstance()->waterHeightRegionInfo(sim_name, water_height);
+ return;
+ }
+
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit);
msg->getS32Fast(_PREHASH_RegionInfo, _PREHASH_PricePerMeter, price_per_meter);
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 7236894542..ba0eb8a711 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -635,7 +635,7 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
// convert global specified position to a local one
F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS );
- F32 region_local_z = (F32)fmod( pos.mdV[VZ], (F64)REGION_WIDTH_METERS );
+ F32 region_local_z = (F32)llclamp( pos.mdV[VZ], 0.0, (F64)REGION_HEIGHT_METERS );
// write in the values
childSetValue("teleport_coordinate_x", region_local_x );
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index 260e15c714..f990b9294d 100644
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -128,7 +128,7 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
- if (gAgentAvatarp->isWearingAttachment(item->getUUID()))
+ if (get_is_item_worn(item->getUUID()))
{
acceptable = false;
}
@@ -139,7 +139,7 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
BOOL copyable = false;
if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true;
- if (!copyable && gAgentWearables.isWearingItem(item->getUUID()))
+ if (!copyable && get_is_item_worn(item->getUUID()))
{
acceptable = false;
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index fe8a46e908..914e7a3df0 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -430,8 +430,9 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list<LLSD>& histo
}
else
{
- // Legacy chat logs only wrote the legacy name, not the agent_id
- gCacheName->getUUID(from, from_id);
+ // convert it to a legacy name if we have a complete name
+ std::string legacy_name = gCacheName->buildLegacyName(from);
+ gCacheName->getUUID(legacy_name, from_id);
}
std::string timestamp = msg[IM_TIME];
@@ -526,8 +527,16 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline()
void LLIMModel::LLIMSession::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
- // if username is empty, display names isn't enabled, use the display name
- mHistoryFileName = av_name.mUsername.empty() ? av_name.mDisplayName : av_name.mUsername;
+ if (av_name.mLegacyFirstName.empty())
+ {
+ // if mLegacyFirstName is empty it means display names is off and the
+ // data came from the gCacheName, mDisplayName will be the legacy name
+ mHistoryFileName = LLCacheName::cleanFullName(av_name.mDisplayName);
+ }
+ else
+ {
+ mHistoryFileName = LLCacheName::cleanFullName(av_name.getLegacyName());
+ }
}
void LLIMModel::LLIMSession::buildHistoryFileName()
@@ -737,8 +746,18 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)
{
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
- {
- LLLogChat::saveHistory(file_name, from, from_id, utf8_text);
+ {
+ std::string from_name = from;
+
+ LLAvatarName av_name;
+ if (!from_id.isNull() &&
+ LLAvatarNameCache::get(from_id, &av_name) &&
+ !av_name.mIsDisplayNameDefault)
+ {
+ from_name = av_name.getCompleteName();
+ }
+
+ LLLogChat::saveHistory(file_name, from_name, from_id, utf8_text);
return true;
}
else
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 29dcb2c4d3..91ede6d221 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -53,6 +53,7 @@
#include "llfloaterreg.h"
#include "llmenubutton.h"
#include "lltextbox.h"
+#include "lltoggleablemenu.h"
#include "lltooltip.h" // positionViewNearMouse()
#include "lltrans.h"
#include "lluictrl.h"
@@ -402,8 +403,8 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data)
// if neither the gear menu or self gear menu are open
void LLInspectAvatar::onMouseLeave(S32 x, S32 y, MASK mask)
{
- LLMenuGL* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
- LLMenuGL* gear_menu_self = getChild<LLMenuButton>("gear_self_btn")->getMenu();
+ LLToggleableMenu* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
+ LLToggleableMenu* gear_menu_self = getChild<LLMenuButton>("gear_self_btn")->getMenu();
if ( gear_menu && gear_menu->getVisible() &&
gear_menu_self && gear_menu_self->getVisible() )
{
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index 532ffca4be..ee076f68ea 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -47,6 +47,7 @@
#include "llsafehandle.h"
#include "llsidetray.h"
#include "lltextbox.h" // for description truncation
+#include "lltoggleablemenu.h"
#include "lltrans.h"
#include "llui.h" // positionViewNearMouse()
#include "lluictrl.h"
@@ -568,7 +569,7 @@ void LLInspectObject::updateSecureBrowsing()
// if the gear menu is not open
void LLInspectObject::onMouseLeave(S32 x, S32 y, MASK mask)
{
- LLMenuGL* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
+ LLToggleableMenu* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
if ( gear_menu && gear_menu->getVisible() )
{
return;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index b15dcd993a..e672892282 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1649,10 +1649,12 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
const LLUUID &cat_id = inv_cat->getUUID();
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false);
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+ const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
const BOOL move_is_into_outfit = getCategory() && (getCategory()->getPreferredType() == LLFolderType::FT_OUTFIT);
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
//--------------------------------------------------------------------------------
// Determine if folder can be moved.
@@ -1690,6 +1692,21 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
}
}
+ if (move_is_into_landmarks)
+ {
+ for (S32 i=0; i < descendent_items.count(); ++i)
+ {
+ LLViewerInventoryItem* item = descendent_items[i];
+
+ // Don't move anything except landmarks and categories into Landmarks folder.
+ // We use getType() instead of getActua;Type() to allow links to landmarks and folders.
+ if (LLAssetType::AT_LANDMARK != item->getType() && LLAssetType::AT_CATEGORY != item->getType())
+ {
+ is_movable = FALSE;
+ break; // It's generally movable, but not into Landmarks.
+ }
+ }
+ }
//
//--------------------------------------------------------------------------------
@@ -2661,6 +2678,8 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data)
{
+ LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
+
//llinfos << "LLFolderBridge::dragOrDrop()" << llendl;
BOOL accept = FALSE;
switch(cargo_type)
@@ -2676,9 +2695,24 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
case DAD_BODYPART:
case DAD_ANIMATION:
case DAD_GESTURE:
+ accept = dragItemIntoFolder(inv_item, drop);
+ break;
case DAD_LINK:
- accept = dragItemIntoFolder((LLInventoryItem*)cargo_data,
- drop);
+ // DAD_LINK type might mean one of two asset types: AT_LINK or AT_LINK_FOLDER.
+ // If we have an item of AT_LINK_FOLDER type we should process the linked
+ // category being dragged or dropped into folder.
+ if (inv_item && LLAssetType::AT_LINK_FOLDER == inv_item->getActualType())
+ {
+ LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID());
+ if (linked_category)
+ {
+ accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop);
+ }
+ }
+ else
+ {
+ accept = dragItemIntoFolder(inv_item, drop);
+ }
break;
case DAD_CATEGORY:
if (LLFriendCardsManager::instance().isAnyFriendCategory(mUUID))
@@ -2875,6 +2909,24 @@ static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_curr
return TRUE;
}
+// Returns TRUE if item is a landmark or a link to a landmark
+// and can be moved to Favorites or Landmarks folder.
+static BOOL can_move_to_landmarks(LLInventoryItem* inv_item)
+{
+ // Need to get the linked item to know its type because LLInventoryItem::getType()
+ // returns actual type AT_LINK for links, not the asset type of a linked item.
+ if (LLAssetType::AT_LINK == inv_item->getType())
+ {
+ LLInventoryItem* linked_item = gInventory.getItem(inv_item->getLinkedUUID());
+ if (linked_item)
+ {
+ return LLAssetType::AT_LANDMARK == linked_item->getType();
+ }
+ }
+
+ return LLAssetType::AT_LANDMARK == inv_item->getType();
+}
+
void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item)
{
// use callback to rearrange favorite landmarks after adding
@@ -2931,9 +2983,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false);
+ const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const BOOL move_is_into_favorites = (mUUID == favorites_id);
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
BOOL accept = FALSE;
@@ -2944,7 +2999,6 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID());
- const BOOL folder_allows_reorder = (mUUID == favorites_id);
//--------------------------------------------------------------------------------
// Determine if item can be moved.
@@ -2990,12 +3044,16 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (!is_movable)
accept = FALSE;
- if ((mUUID == inv_item->getParentUUID()) && !folder_allows_reorder)
+ if ((mUUID == inv_item->getParentUUID()) && !move_is_into_favorites)
accept = FALSE;
if (move_is_into_current_outfit || move_is_into_outfit)
{
accept = can_move_to_outfit(inv_item, move_is_into_current_outfit);
}
+ else if (move_is_into_favorites || move_is_into_landmarks)
+ {
+ accept = can_move_to_landmarks(inv_item);
+ }
if(accept && drop)
{
@@ -3021,8 +3079,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
//
// REORDER
- // (only reorder the item)
- if ((mUUID == inv_item->getParentUUID()) && folder_allows_reorder)
+ // (only reorder the item in Favorites folder)
+ if ((mUUID == inv_item->getParentUUID()) && move_is_into_favorites)
{
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
@@ -3036,7 +3094,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// FAVORITES folder
// (copy the item)
- else if (favorites_id == mUUID)
+ else if (move_is_into_favorites)
{
dropToFavorites(inv_item);
}
@@ -3101,6 +3159,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
accept = FALSE;
}
+ // Don't allow to move a single item to Favorites or Landmarks
+ // if it is not a landmark or a link to a landmark.
+ else if ((move_is_into_favorites || move_is_into_landmarks)
+ && !can_move_to_landmarks(inv_item))
+ {
+ accept = FALSE;
+ }
if(drop && accept)
{
@@ -3146,12 +3211,18 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
accept = can_move_to_outfit(inv_item, move_is_into_current_outfit);
}
+ // Don't allow to move a single item to Favorites or Landmarks
+ // if it is not a landmark or a link to a landmark.
+ else if (move_is_into_favorites || move_is_into_landmarks)
+ {
+ accept = can_move_to_landmarks(inv_item);
+ }
if (accept && drop)
{
// FAVORITES folder
// (copy the item)
- if (favorites_id == mUUID)
+ if (move_is_into_favorites)
{
dropToFavorites(inv_item);
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index f3d9639dee..ef20869114 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -487,12 +487,9 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryIte
return false;
break;
case LLAssetType::AT_OBJECT:
- if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
- return true;
- break;
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
- if(!gAgentWearables.isWearingItem(item->getUUID()))
+ if (!get_is_item_worn(item->getUUID()))
return true;
break;
default:
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index 7216d61e7f..3f4f33e88d 100644
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -50,7 +50,7 @@ public:
LLIconDictionary::LLIconDictionary()
{
addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture"));
- addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture"));
+ addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Sound"));
addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard"));
addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard"));
addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark"));
@@ -83,7 +83,7 @@ LLIconDictionary::LLIconDictionary()
addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture"));
addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem"));
- addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem"));
+ addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkFolder"));
addEntry(LLInventoryIcon::ICONNAME_INVALID, new IconEntry("Inv_Invalid"));
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 50adae09c0..0870b5b8dd 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -290,7 +290,10 @@ void LLInventoryPanel::modelChanged(U32 mask)
const LLUUID& item_id = (*items_iter);
const LLInventoryObject* model_item = model->getObject(item_id);
LLFolderViewItem* view_item = mFolderRoot->getItemByID(item_id);
- LLFolderViewFolder* view_folder = mFolderRoot->getFolderByID(item_id);
+
+ // LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item
+ // to folder is the fast way to get a folder without searching through folders tree.
+ LLFolderViewFolder* view_folder = dynamic_cast<LLFolderViewFolder*>(view_item);
//////////////////////////////
// LABEL Operation
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index c8fd1e1d9a..8c70b1e973 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -26,18 +26,13 @@
#include "llviewerprecompiledheaders.h"
-#include "lllogchat.h"
-
-// viewer includes
#include "llagent.h"
#include "llagentui.h"
+#include "lllogchat.h"
#include "lltrans.h"
#include "llviewercontrol.h"
-// library includes
-#include "llchat.h"
#include "llinstantmessage.h"
-#include "llsdserialize.h"
#include "llsingleton.h" // for LLSingleton
#include <boost/algorithm/string/trim.hpp>
@@ -65,7 +60,6 @@ const std::string IM_TIME("time");
const std::string IM_TEXT("message");
const std::string IM_FROM("from");
const std::string IM_FROM_ID("from_id");
-const std::string IM_SOURCE_TYPE("source_type");
const static std::string IM_SEPARATOR(": ");
const static std::string NEW_LINE("\n");
@@ -93,7 +87,7 @@ const static boost::regex TIMESTAMP_AND_STUFF("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+
* Regular expression suitable to match names like
* "You", "Second Life", "Igor ProductEngine", "Object", "Mega House"
*/
-const static boost::regex NAME_AND_TEXT("(You:|Second Life:|[^\\s:]+\\s*[:]{1}|\\S+\\s+[^\\s:]+[:]{1})?(\\s*)(.*)");
+const static boost::regex NAME_AND_TEXT("([^:]+[:]{1})?(\\s*)(.*)");
//is used to parse complex object names like "Xstreet SL Terminal v2.2.5 st"
const static std::string NAME_TEXT_DIVIDER(": ");
@@ -190,8 +184,7 @@ std::string LLLogChat::makeLogFileName(std::string filename)
{
filename = cleanFileName(filename);
filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename);
- // new files are llsd notation format
- filename += ".llsd";
+ filename += ".txt";
return filename;
}
@@ -241,18 +234,6 @@ void LLLogChat::saveHistory(const std::string& filename,
const LLUUID& from_id,
const std::string& line)
{
- LLChat chat;
- chat.mText = line;
- chat.mFromName = from;
- chat.mFromID = from_id;
- // default to being from an agent
- chat.mSourceType = CHAT_SOURCE_AGENT;
- saveHistory(filename, chat);
-}
-
-//static
-void LLLogChat::saveHistory(const std::string& filename, const LLChat& chat)
-{
std::string tmp_filename = filename;
LLStringUtil::trim(tmp_filename);
if (tmp_filename.empty())
@@ -273,27 +254,89 @@ void LLLogChat::saveHistory(const std::string& filename, const LLChat& chat)
LLSD item;
if (gSavedPerAccountSettings.getBOOL("LogTimestamp"))
- item[IM_TIME] = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate"));
+ item["time"] = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate"));
- item[IM_FROM_ID] = chat.mFromID;
- item[IM_TEXT] = chat.mText;
- item[IM_SOURCE_TYPE] = chat.mSourceType;
+ item["from_id"] = from_id;
+ item["message"] = line;
//adding "Second Life:" for all system messages to make chat log history parsing more reliable
- if (chat.mFromName.empty() && chat.mFromID.isNull())
+ if (from.empty() && from_id.isNull())
{
- item[IM_FROM] = SYSTEM_FROM;
+ item["from"] = SYSTEM_FROM;
}
else
{
- item[IM_FROM] = chat.mFromName;
+ item["from"] = from;
}
- file << LLSDOStreamer<LLSDNotationFormatter>(item) << std::endl;
+ file << LLChatLogFormatter(item) << std::endl;
file.close();
}
+void LLLogChat::loadHistory(const std::string& filename, void (*callback)(ELogLineType, const LLSD&, void*), void* userdata)
+{
+ if(!filename.size())
+ {
+ llwarns << "Filename is Empty!" << llendl;
+ return ;
+ }
+
+ LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/
+ if (!fptr)
+ {
+ callback(LOG_EMPTY, LLSD(), userdata);
+ return; //No previous conversation with this name.
+ }
+ else
+ {
+ char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/
+ char *bptr;
+ S32 len;
+ bool firstline=TRUE;
+
+ if ( fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END) )
+ { //File is smaller than recall size. Get it all.
+ firstline = FALSE;
+ if ( fseek(fptr, 0, SEEK_SET) )
+ {
+ fclose(fptr);
+ return;
+ }
+ }
+
+ while ( fgets(buffer, LOG_RECALL_SIZE, fptr) && !feof(fptr) )
+ {
+ len = strlen(buffer) - 1; /*Flawfinder: ignore*/
+ for ( bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--) *bptr='\0';
+
+ if (!firstline)
+ {
+ LLSD item;
+ std::string line(buffer);
+ std::istringstream iss(line);
+
+ if (!LLChatLogParser::parse(line, item))
+ {
+ item["message"] = line;
+ callback(LOG_LINE, item, userdata);
+ }
+ else
+ {
+ callback(LOG_LLSD, item, userdata);
+ }
+ }
+ else
+ {
+ firstline = FALSE;
+ }
+ }
+ callback(LOG_END, LLSD(), userdata);
+
+ fclose(fptr);
+ }
+}
+
void append_to_last_message(std::list<LLSD>& messages, const std::string& line)
{
if (!messages.size()) return;
@@ -367,24 +410,52 @@ void LLLogChat::loadAllHistory(const std::string& file_name, std::list<LLSD>& me
fclose(fptr);
}
-// static
-bool LLChatLogParser::parse(const std::string& raw, LLSD& im)
+//*TODO mark object's names in a special way so that they will be distinguishable form avatar name
+//which are more strict by its nature (only firstname and secondname)
+//Example, an object's name can be writen like "Object <actual_object's_name>"
+void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const
{
- if (!raw.length()) return false;
+ if (!im.isMap())
+ {
+ llwarning("invalid LLSD type of an instant message", 0);
+ return;
+ }
+
+ if (im[IM_TIME].isDefined())
+{
+ std::string timestamp = im[IM_TIME].asString();
+ boost::trim(timestamp);
+ ostr << '[' << timestamp << ']' << TWO_SPACES;
+ }
- im = LLSD::emptyMap();
+ //*TODO mark object's names in a special way so that they will be distinguishable form avatar name
+ //which are more strict by its nature (only firstname and secondname)
+ //Example, an object's name can be writen like "Object <actual_object's_name>"
+ if (im[IM_FROM].isDefined())
+ {
+ std::string from = im[IM_FROM].asString();
+ boost::trim(from);
+ if (from.size())
+ {
+ ostr << from << IM_SEPARATOR;
+ }
+ }
- // In Viewer 2.1 we added UUID to chat/IM logging so we can look up
- // display names
- if (raw[0] == '{')
+ if (im[IM_TEXT].isDefined())
{
- // ...this is a viewer 2.1, new-style LLSD notation format log
- std::istringstream raw_stream(raw);
- LLPointer<LLSDParser> parser = new LLSDNotationParser();
- S32 count = parser->parse(raw_stream, im, raw.length());
- // expect several map items per parsed line
- return (count != LLSDParser::PARSE_FAILURE);
+ std::string im_text = im[IM_TEXT].asString();
+
+ //multilined text will be saved with prepended spaces
+ boost::replace_all(im_text, NEW_LINE, NEW_LINE_SPACE_PREFIX);
+ ostr << im_text;
}
+ }
+
+bool LLChatLogParser::parse(std::string& raw, LLSD& im)
+{
+ if (!raw.length()) return false;
+
+ im = LLSD::emptyMap();
//matching a timestamp
boost::match_results<std::string::const_iterator> matches;
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index 8b1cc3484f..6958d56311 100644
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -41,22 +41,49 @@ public:
};
static std::string timestamp(bool withdate = false);
static std::string makeLogFileName(std::string(filename));
-
- // Log a single line item to the appropriate chat file
- static void saveHistory(const std::string& filename, const LLChat& chat);
-
- // Prefer the above version - it saves more metadata about the item
static void saveHistory(const std::string& filename,
const std::string& from,
const LLUUID& from_id,
const std::string& line);
+ /** @deprecated @see loadAllHistory() */
+ static void loadHistory(const std::string& filename,
+ void (*callback)(ELogLineType, const LLSD&, void*),
+ void* userdata);
+
static void loadAllHistory(const std::string& file_name, std::list<LLSD>& messages);
private:
static std::string cleanFileName(std::string filename);
};
/**
+ * Formatter for the plain text chat log files
+ */
+class LLChatLogFormatter
+{
+public:
+ LLChatLogFormatter(const LLSD& im) : mIM(im) {}
+ virtual ~LLChatLogFormatter() {};
+
+ friend std::ostream& operator<<(std::ostream& str, const LLChatLogFormatter& formatter)
+ {
+ formatter.format(formatter.mIM, str);
+ return str;
+ }
+
+protected:
+
+ /**
+ * Format an instant message to a stream
+ * Timestamps and sender names are required
+ * New lines of multilined messages are prepended with a space
+ */
+ void format(const LLSD& im, std::ostream& ostr) const;
+
+ LLSD mIM;
+};
+
+/**
* Parser for the plain text chat log files
*/
class LLChatLogParser
@@ -74,7 +101,7 @@ public:
*
* @return false if failed to parse mandatory data - message text
*/
- static bool parse(const std::string& raw, LLSD& im);
+ static bool parse(std::string& raw, LLSD& im);
protected:
LLChatLogParser();
@@ -86,6 +113,5 @@ extern const std::string IM_TIME; //("time");
extern const std::string IM_TEXT; //("message");
extern const std::string IM_FROM; //("from");
extern const std::string IM_FROM_ID; //("from_id");
-extern const std::string IM_SOURCE_TYPE; //("source_type");
#endif
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index f16cc4cef4..180695e40b 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -46,6 +46,8 @@
#include "llchathistory.h"
#include "llstylemap.h"
+#include "llavatarnamecache.h"
+
#include "lldraghandle.h"
#include "llbottomtray.h"
@@ -179,7 +181,21 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
if (gSavedPerAccountSettings.getBOOL("LogNearbyChat"))
{
- LLLogChat::saveHistory("chat", chat);
+ std::string from_name = chat.mFromName;
+
+ if (chat.mSourceType == CHAT_SOURCE_AGENT)
+ {
+ // if the chat is coming from an agent, log the complete name
+ LLAvatarName av_name;
+ LLAvatarNameCache::get(chat.mFromID, &av_name);
+
+ if (!av_name.mIsDisplayNameDefault)
+ {
+ from_name = av_name.getCompleteName();
+ }
+ }
+
+ LLLogChat::saveHistory("chat", from_name, chat.mFromID, chat.mText);
}
}
@@ -248,11 +264,23 @@ void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue)
nearby_chat->updateChatHistoryStyle();
}
-bool isTwoWordsName(const std::string& name)
+bool isWordsName(const std::string& name)
{
- //checking for a single space
- S32 pos = name.find(' ', 0);
- return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos;
+ // checking to see if it's display name plus username in parentheses
+ S32 open_paren = name.find(" (", 0);
+ S32 close_paren = name.find(')', 0);
+
+ if (open_paren != std::string::npos &&
+ close_paren == name.length()-1)
+ {
+ return true;
+ }
+ else
+ {
+ //checking for a single space
+ S32 pos = name.find(' ', 0);
+ return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos;
+ }
}
void LLNearbyChat::loadHistory()
@@ -275,9 +303,10 @@ void LLNearbyChat::loadHistory()
from_id = msg[IM_FROM_ID].asUUID();
}
else
- {
- gCacheName->getUUID(from, from_id);
- }
+ {
+ std::string legacy_name = gCacheName->buildLegacyName(from);
+ gCacheName->getUUID(legacy_name, from_id);
+ }
LLChat chat;
chat.mFromName = from;
@@ -286,18 +315,15 @@ void LLNearbyChat::loadHistory()
chat.mTimeStr = msg[IM_TIME].asString();
chat.mChatStyle = CHAT_STYLE_HISTORY;
- if (msg.has(IM_SOURCE_TYPE))
- {
- S32 source_type = msg[IM_SOURCE_TYPE].asInteger();
- chat.mSourceType = (EChatSourceType)source_type;
- }
- else if (from_id.isNull() && SYSTEM_FROM == from)
+ chat.mSourceType = CHAT_SOURCE_AGENT;
+ if (from_id.isNull() && SYSTEM_FROM == from)
{
chat.mSourceType = CHAT_SOURCE_SYSTEM;
+
}
else if (from_id.isNull())
{
- chat.mSourceType = isTwoWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT;
+ chat.mSourceType = isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT;
}
addMessage(chat, true, do_not_log);
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 47d32e57fb..d2ad78f140 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -64,6 +64,18 @@ public:
LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id)
{
mStopProcessing = false;
+
+ LLControlVariable* ctrl = gSavedSettings.getControl("NearbyToastLifeTime").get();
+ if (ctrl)
+ {
+ ctrl->getSignal()->connect(boost::bind(&LLNearbyChatScreenChannel::updateToastsLifetime, this));
+ }
+
+ ctrl = gSavedSettings.getControl("NearbyToastFadingTime").get();
+ if (ctrl)
+ {
+ ctrl->getSignal()->connect(boost::bind(&LLNearbyChatScreenChannel::updateToastFadingTime, this));
+ }
}
void addNotification (LLSD& notification);
@@ -109,13 +121,26 @@ protected:
if (!toast) return;
LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl;
toast->setVisible(FALSE);
- toast->stopTimer();
+ toast->stopFading();
toast->setIsHidden(true);
+
+ // Nearby chat toasts that are hidden, not destroyed. They are collected to the toast pool, so that
+ // they can be used next time, this is done for performance. But if the toast lifetime was changed
+ // (from preferences floater (STORY-36)) while it was shown (at this moment toast isn't in the pool yet)
+ // changes don't take affect.
+ // So toast's lifetime should be updated each time it's added to the pool. Otherwise viewer would have
+ // to be restarted so that changes take effect.
+ toast->setLifetime(gSavedSettings.getS32("NearbyToastLifeTime"));
+ toast->setFadingTime(gSavedSettings.getS32("NearbyToastFadingTime"));
m_toast_pool.push_back(toast->getHandle());
}
void createOverflowToast(S32 bottom, F32 timer);
+ void updateToastsLifetime();
+
+ void updateToastFadingTime();
+
create_toast_panel_callback_t m_create_toast_panel_callback_t;
bool createPoolToast();
@@ -205,6 +230,27 @@ void LLNearbyChatScreenChannel::onToastFade(LLToast* toast)
arrangeToasts();
}
+void LLNearbyChatScreenChannel::updateToastsLifetime()
+{
+ S32 seconds = gSavedSettings.getS32("NearbyToastLifeTime");
+ toast_list_t::iterator it;
+
+ for(it = m_toast_pool.begin(); it != m_toast_pool.end(); ++it)
+ {
+ (*it).get()->setLifetime(seconds);
+ }
+}
+
+void LLNearbyChatScreenChannel::updateToastFadingTime()
+{
+ S32 seconds = gSavedSettings.getS32("NearbyToastFadingTime");
+ toast_list_t::iterator it;
+
+ for(it = m_toast_pool.begin(); it != m_toast_pool.end(); ++it)
+ {
+ (*it).get()->setFadingTime(seconds);
+ }
+}
bool LLNearbyChatScreenChannel::createPoolToast()
{
@@ -250,7 +296,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
{
panel->addMessage(notification);
toast->reshapeToPanel();
- toast->resetTimer();
+ toast->startFading();
arrangeToasts();
return;
@@ -295,7 +341,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
panel->init(notification);
toast->reshapeToPanel();
- toast->resetTimer();
+ toast->startFading();
m_active_toasts.push_back(toast->getHandle());
@@ -325,9 +371,9 @@ void LLNearbyChatScreenChannel::arrangeToasts()
int sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second)
{
- F32 v1 = first.get()->getTimer()->getEventTimer().getElapsedTimeF32();
- F32 v2 = second.get()->getTimer()->getEventTimer().getElapsedTimeF32();
- return v1 < v2;
+ F32 v1 = first.get()->getTimeLeftToLive();
+ F32 v2 = second.get()->getTimeLeftToLive();
+ return v1 > v2;
}
void LLNearbyChatScreenChannel::showToastsBottom()
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 33c968bf00..6435126fc0 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -42,6 +42,7 @@
#include "llnotificationsutil.h"
#include "lloutfitobserver.h"
#include "llsidetray.h"
+#include "lltoggleablemenu.h"
#include "lltransutil.h"
#include "llviewermenu.h"
#include "llvoavatar.h"
@@ -114,7 +115,7 @@ public:
registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this));
registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this));
registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this));
- registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this));
+ registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList));
registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2));
registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this));
@@ -122,7 +123,7 @@ public:
enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitListGearMenu::onEnable, this, _2));
enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2));
- mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(
+ mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_outfit_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
llassert(mMenu);
}
@@ -137,7 +138,7 @@ public:
mMenu->arrangeAndClear(); // update menu height
}
- LLMenuGL* getMenu() { return mMenu; }
+ LLToggleableMenu* getMenu() { return mMenu; }
private:
const LLUUID& getSelectedOutfitID()
@@ -196,15 +197,6 @@ private:
}
}
- void onDelete()
- {
- const LLUUID& selected_outfit_id = getSelectedOutfitID();
- if (selected_outfit_id.notNull())
- {
- remove_category(&gInventory, selected_outfit_id);
- }
- }
-
void onCreate(const LLSD& data)
{
LLWearableType::EType type = LLWearableType::typeNameToType(data.asString());
@@ -251,14 +243,20 @@ private:
return true;
}
- LLOutfitsList* mOutfitList;
- LLMenuGL* mMenu;
+ LLOutfitsList* mOutfitList;
+ LLToggleableMenu* mMenu;
};
//////////////////////////////////////////////////////////////////////////
class LLOutfitContextMenu : public LLListContextMenu
{
+public:
+
+ LLOutfitContextMenu(LLOutfitsList* outfit_list)
+ : LLListContextMenu(),
+ mOutfitList(outfit_list)
+ {}
protected:
/* virtual */ LLContextMenu* createMenu()
{
@@ -274,7 +272,7 @@ protected:
boost::bind(&LLAppearanceMgr::takeOffOutfit, &LLAppearanceMgr::instance(), selected_id));
registrar.add("Outfit.Edit", boost::bind(editOutfit));
registrar.add("Outfit.Rename", boost::bind(renameOutfit, selected_id));
- registrar.add("Outfit.Delete", boost::bind(deleteOutfit, selected_id));
+ registrar.add("Outfit.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList));
enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitContextMenu::onEnable, this, _2));
enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitContextMenu::onVisible, this, _2));
@@ -337,10 +335,8 @@ protected:
LLAppearanceMgr::instance().renameOutfit(outfit_cat_id);
}
- static void deleteOutfit(const LLUUID& outfit_cat_id)
- {
- remove_category(&gInventory, outfit_cat_id);
- }
+private:
+ LLOutfitsList* mOutfitList;
};
//////////////////////////////////////////////////////////////////////////
@@ -357,7 +353,7 @@ LLOutfitsList::LLOutfitsList()
mCategoriesObserver = new LLInventoryCategoriesObserver();
mGearMenu = new LLOutfitListGearMenu(this);
- mOutfitMenu = new LLOutfitContextMenu();
+ mOutfitMenu = new LLOutfitContextMenu(this);
}
LLOutfitsList::~LLOutfitsList()
@@ -634,6 +630,14 @@ void LLOutfitsList::performAction(std::string action)
void LLOutfitsList::removeSelected()
{
+ LLNotificationsUtil::add("DeleteOutfits", LLSD(), LLSD(), boost::bind(&LLOutfitsList::onOutfitsRemovalConfirmation, this, _1, _2));
+}
+
+void LLOutfitsList::onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0) return; // canceled
+
if (mSelectedOutfitUUID.notNull())
{
remove_category(&gInventory, mSelectedOutfitUUID);
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 5fecbb83e7..a0598737f1 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -110,6 +110,8 @@ public:
private:
+ void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response);
+
/**
* Wrapper for LLCommonUtils::computeDifference. @see LLCommonUtils::computeDifference
*/
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 35f898bfa6..d1362d7922 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -49,6 +49,7 @@
#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "llfocusmgr.h"
+#include "llviewercontrol.h"
#include "roles_constants.h"
@@ -742,10 +743,12 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
mHasMatch(FALSE),
mNumOwnerAdditions(0)
{
+ mUdpateSessionID = LLUUID::null;
}
LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
{
+ gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName());
}
BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
@@ -772,6 +775,17 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
// Show the member's profile on double click.
mMembersList->setDoubleClickCallback(onMemberDoubleClick, this);
mMembersList->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
+
+ LLSD row;
+ row["columns"][0]["column"] = "name";
+ row["columns"][1]["column"] = "donated";
+ row["columns"][2]["column"] = "online";
+ mMembersList->addElement(row);
+ std::string order_by = gSavedSettings.getString("GroupMembersSortOrder");
+ if(!order_by.empty())
+ {
+ mMembersList->sortByColumn(order_by, TRUE);
+ }
LLButton* button = parent->getChild<LLButton>("member_invite", recurse);
if ( button )
@@ -1529,6 +1543,10 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
mMemberProgress = gdatap->mMembers.begin();
mPendingMemberUpdate = TRUE;
mHasMatch = FALSE;
+ // Generate unique ID for current updateMembers()- see onNameCache for details.
+ // Using unique UUID is perhaps an overkill but this way we are perfectly safe
+ // from coincidences.
+ mUdpateSessionID.generate();
}
else
{
@@ -1556,6 +1574,63 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
}
}
+void LLPanelGroupMembersSubTab::addMemberToList(LLUUID id, LLGroupMemberData* data)
+{
+ if (!data) return;
+ LLUIString donated = getString("donation_area");
+ donated.setArg("[AREA]", llformat("%d", data->getContribution()));
+
+ LLSD row;
+ row["id"] = id;
+
+ row["columns"][0]["column"] = "name";
+ // value is filled in by name list control
+
+ row["columns"][1]["column"] = "donated";
+ row["columns"][1]["value"] = donated.getString();
+
+ row["columns"][2]["column"] = "online";
+ row["columns"][2]["value"] = data->getOnlineStatus();
+ row["columns"][2]["font"] = "SANSSERIF_SMALL";
+
+ mMembersList->addElement(row);
+
+ mHasMatch = TRUE;
+}
+
+void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, const LLUUID& id)
+{
+ // Update ID is used to determine whether member whose id is passed
+ // into onNameCache() was passed after current or previous user-initiated update.
+ // This is needed to avoid probable duplication of members in list after changing filter
+ // or adding of members of another group if gets for their names were called on
+ // previous update. If this id is from get() called from older update,
+ // we do nothing.
+ if (mUdpateSessionID != update_id) return;
+
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
+ if (!gdatap)
+ {
+ llwarns << "LLPanelGroupMembersSubTab::updateMembers() -- No group data!" << llendl;
+ return;
+ }
+
+ std::string fullname;
+ gCacheName->getFullName(id, fullname);
+
+ LLGroupMemberData* data;
+ // trying to avoid unnecessary hash lookups
+ if (matchesSearchFilter(fullname) && ((data = gdatap->mMembers[id]) != NULL))
+ {
+ addMemberToList(id, data);
+ if(!mMembersList->getEnabled())
+ {
+ mMembersList->setEnabled(TRUE);
+ }
+ }
+
+}
+
void LLPanelGroupMembersSubTab::updateMembers()
{
mPendingMemberUpdate = FALSE;
@@ -1580,12 +1655,13 @@ void LLPanelGroupMembersSubTab::updateMembers()
//cleanup list only for first iretation
if(mMemberProgress == gdatap->mMembers.begin())
+ {
mMembersList->deleteAllItems();
+ }
LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
- LLUIString donated = getString("donation_area");
-
+
S32 i = 0;
for( ; mMemberProgress != end && i<UPDATE_MEMBERS_PER_FRAME;
++mMemberProgress, ++i)
@@ -1593,38 +1669,19 @@ void LLPanelGroupMembersSubTab::updateMembers()
if (!mMemberProgress->second)
continue;
// Do filtering on name if it is already in the cache.
- bool add_member = true;
-
std::string fullname;
if (gCacheName->getFullName(mMemberProgress->first, fullname))
{
- if ( !matchesSearchFilter(fullname) )
+ if (matchesSearchFilter(fullname))
{
- add_member = false;
+ addMemberToList(mMemberProgress->first, mMemberProgress->second);
}
}
-
- if (add_member)
+ else
{
- donated.setArg("[AREA]", llformat("%d", mMemberProgress->second->getContribution()));
-
- LLSD row;
- row["id"] = (*mMemberProgress).first;
-
- row["columns"][0]["column"] = "name";
- // value is filled in by name list control
-
- row["columns"][1]["column"] = "donated";
- row["columns"][1]["value"] = donated.getString();
-
- row["columns"][2]["column"] = "online";
- row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus();
- row["columns"][2]["font"] = "SANSSERIF_SMALL";
-
- LLScrollListItem* member = mMembersList->addElement(row);
-
- LLUUID id = member->getUUID();
- mHasMatch = TRUE;
+ // If name is not cached, onNameCache() should be called when it is cached and add this member to list.
+ gCacheName->get(mMemberProgress->first, FALSE, boost::bind(&LLPanelGroupMembersSubTab::onNameCache,
+ this, mUdpateSessionID, _1));
}
}
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 6a773f1ebb..270259c16f 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -187,6 +187,9 @@ public:
virtual void setGroupID(const LLUUID& id);
+ void addMemberToList(LLUUID id, LLGroupMemberData* data);
+ void onNameCache(const LLUUID& update_id, const LLUUID& id);
+
protected:
typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t;
typedef std::map<LLUUID, role_change_data_map_t*> member_role_changes_map_t;
@@ -207,6 +210,9 @@ protected:
BOOL mPendingMemberUpdate;
BOOL mHasMatch;
+ // This id is generated after each user initiated member list update(opening Roles or changing filter)
+ LLUUID mUdpateSessionID;
+
member_role_changes_map_t mMemberRoleChangeData;
U32 mNumOwnerAdditions;
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index e5695f420a..d25b8e0e02 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -51,6 +51,7 @@
#include "llplacesinventorybridge.h"
#include "llplacesinventorypanel.h"
#include "llsidetray.h"
+#include "lltoggleablemenu.h"
#include "llviewermenu.h"
#include "llviewerregion.h"
@@ -706,8 +707,8 @@ void LLLandmarksPanel::initListCommandsHandlers()
mCommitCallbackRegistrar.add("Places.LandmarksGear.Folding.Action", boost::bind(&LLLandmarksPanel::onFoldingAction, this, _2));
mEnableCallbackRegistrar.add("Places.LandmarksGear.Check", boost::bind(&LLLandmarksPanel::isActionChecked, this, _2));
mEnableCallbackRegistrar.add("Places.LandmarksGear.Enable", boost::bind(&LLLandmarksPanel::isActionEnabled, this, _2));
- mGearLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_places_gear_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mGearFolderMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_places_gear_folder.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ 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());
mListCommands->childSetAction(ADD_BUTTON_NAME, boost::bind(&LLLandmarksPanel::showActionMenu, this, mMenuAdd, ADD_BUTTON_NAME));
@@ -726,7 +727,7 @@ void LLLandmarksPanel::updateListCommands()
void LLLandmarksPanel::onActionsButtonClick()
{
- LLMenuGL* menu = mGearFolderMenu;
+ LLToggleableMenu* menu = mGearFolderMenu;
LLFolderViewItem* cur_item = NULL;
if(mCurrentSelectedList)
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 28c19d3e5f..8dcbca0440 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -41,6 +41,7 @@ class LLAccordionCtrlTab;
class LLFolderViewItem;
class LLMenuButton;
class LLMenuGL;
+class LLToggleableMenu;
class LLInventoryPanel;
class LLPlacesInventoryPanel;
@@ -157,8 +158,8 @@ private:
LLPlacesInventoryPanel* mMyInventoryPanel;
LLPlacesInventoryPanel* mLibraryInventoryPanel;
LLMenuButton* mGearButton;
- LLMenuGL* mGearLandmarkMenu;
- LLMenuGL* mGearFolderMenu;
+ LLToggleableMenu* mGearLandmarkMenu;
+ LLToggleableMenu* mGearFolderMenu;
LLMenuGL* mMenuAdd;
LLPlacesInventoryPanel* mCurrentSelectedList;
LLInventoryObserver* mInventoryObserver;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index cc69dbd9d4..904e3dabcc 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -46,6 +46,7 @@
#include "llscrollcontainer.h"
#include "llsdserialize.h"
#include "llspinctrl.h"
+#include "lltoggleablemenu.h"
#include "lltooldraganddrop.h"
#include "llviewermenu.h"
#include "llviewertexturelist.h"
@@ -915,7 +916,7 @@ void LLPanelMainInventory::initListCommandsHandlers()
mCommitCallbackRegistrar.add("Inventory.GearDefault.Custom.Action", boost::bind(&LLPanelMainInventory::onCustomAction, this, _2));
mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2));
- mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mGearMenuButton->setMenu(mMenuGearDefault);
mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index f95a99157d..d136e2d32e 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -42,6 +42,7 @@ class LLTabContainer;
class LLFloaterInventoryFinder;
class LLMenuButton;
class LLMenuGL;
+class LLToggleableMenu;
class LLFloater;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -143,7 +144,7 @@ protected:
void setUploadCostIfNeeded();
private:
LLDragAndDropButton* mTrashButton;
- LLMenuGL* mMenuGearDefault;
+ LLToggleableMenu* mMenuGearDefault;
LLMenuGL* mMenuAdd;
LLMenuButton* mGearMenuButton;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 5638374178..ce9b1c66d7 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -62,6 +62,7 @@
#include "llsaveoutfitcombobtn.h"
#include "llscrolllistctrl.h"
#include "lltextbox.h"
+#include "lltoggleablemenu.h"
#include "lltrans.h"
#include "lluictrlfactory.h"
#include "llsdutil.h"
@@ -152,13 +153,13 @@ std::string LLShopURLDispatcher::resolveURL(LLAssetType::EType asset_type, ESex
class LLPanelOutfitEditGearMenu
{
public:
- static LLMenuGL* create()
+ static LLToggleableMenu* create()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("Wearable.Create", boost::bind(onCreate, _2));
- LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(
+ LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_cof_gear.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
llassert(menu);
if (menu)
@@ -219,7 +220,7 @@ private:
class LLAddWearablesGearMenu : public LLInitClass<LLAddWearablesGearMenu>
{
public:
- static LLMenuGL* create(LLWearableItemsList* flat_list, LLInventoryPanel* inventory_panel)
+ static LLToggleableMenu* create(LLWearableItemsList* flat_list, LLInventoryPanel* inventory_panel)
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
@@ -234,7 +235,7 @@ public:
enable_registrar.add("AddWearable.Gear.Check", boost::bind(onCheck, flat_list_handle, inventory_panel_handle, _2));
enable_registrar.add("AddWearable.Gear.Visible", boost::bind(onVisible, inventory_panel_handle, _2));
- LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(
+ LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_add_wearable_gear.xml",
LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
@@ -404,6 +405,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
mAddWearablesPanel(NULL),
mFolderViewFilterCmbBox(NULL),
mListViewFilterCmbBox(NULL),
+ mWearableListManager(NULL),
mPlusBtn(NULL),
mWearablesGearMenuBtn(NULL),
mGearMenuBtn(NULL)
@@ -431,6 +433,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
LLPanelOutfitEdit::~LLPanelOutfitEdit()
{
+ delete mWearableListManager;
delete mSavedFolderState;
delete mCOFDragAndDropObserver;
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 963db84503..fd366e9cbc 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -233,8 +233,8 @@ private:
std::vector<LLFilterItem*> mListViewItemTypes;
LLCOFWearables* mCOFWearables;
- LLMenuGL* mGearMenu;
- LLMenuGL* mAddWearablesGearMenu;
+ LLToggleableMenu* mGearMenu;
+ LLToggleableMenu* mAddWearablesGearMenu;
bool mInitialized;
std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
LLMenuButton* mWearablesGearMenuBtn;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 4f2cfa2bbc..a90f864ae2 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -258,17 +258,7 @@ void LLPanelOutfitsInventory::updateListCommands()
void LLPanelOutfitsInventory::onTrashButtonClick()
{
- LLNotificationsUtil::add("DeleteOutfits", LLSD(), LLSD(), boost::bind(&LLPanelOutfitsInventory::onOutfitsRemovalConfirmation, this, _1, _2));
-}
-
-void LLPanelOutfitsInventory::onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option != 0) return; // canceled
-
mMyOutfitsPanel->removeSelected();
- updateListCommands();
- updateVerbs();
}
bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index f1ca1dbfeb..a7917b457c 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -89,7 +89,6 @@ protected:
void onWearButtonClick();
void showGearMenu();
void onTrashButtonClick();
- void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response);
bool isActionEnabled(const LLSD& userdata);
void setWearablesLoading(bool val);
void onWearablesLoaded();
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index b79a2d3224..71c812efe2 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -35,6 +35,7 @@
#include "lleventtimer.h"
#include "llfiltereditor.h"
#include "lltabcontainer.h"
+#include "lltoggleablemenu.h"
#include "lluictrlfactory.h"
#include "llpanelpeople.h"
@@ -632,28 +633,28 @@ BOOL LLPanelPeople::postBuild()
LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mGroupPlusMenuHandle = plus_menu->getHandle();
- LLMenuGL* nearby_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_people_nearby_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ LLToggleableMenu* nearby_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_nearby_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if(nearby_view_sort)
{
mNearbyViewSortMenuHandle = nearby_view_sort->getHandle();
mNearbyGearButton->setMenu(nearby_view_sort);
}
- LLMenuGL* friend_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_people_friends_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ LLToggleableMenu* friend_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_friends_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if(friend_view_sort)
{
mFriendsViewSortMenuHandle = friend_view_sort->getHandle();
mFriendsGearButton->setMenu(friend_view_sort);
}
- LLMenuGL* group_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_people_groups_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ LLToggleableMenu* group_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_groups_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if(group_view_sort)
{
mGroupsViewSortMenuHandle = group_view_sort->getHandle();
mGroupsGearButton->setMenu(group_view_sort);
}
- LLMenuGL* recent_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_people_recent_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ LLToggleableMenu* recent_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_recent_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if(recent_view_sort)
{
mRecentViewSortMenuHandle = recent_view_sort->getHandle();
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 766f93e0a5..fff8ccb912 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -41,6 +41,7 @@
#include "llflatlistview.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
+#include "lltoggleablemenu.h"
#include "llviewermenu.h"
#include "lllandmarkactions.h"
#include "llclipboard.h"
@@ -450,7 +451,7 @@ BOOL LLTeleportHistoryPanel::postBuild()
mMenuGearButton = getChild<LLMenuButton>("gear_btn");
- LLMenuGL* gear_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());;
+ 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();
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 3b3d0cdce5..911a9e5dda 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -28,6 +28,8 @@
#include "llpanelwearing.h"
+#include "lltoggleablemenu.h"
+
#include "llappearancemgr.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
@@ -59,12 +61,12 @@ public:
enable_registrar.add("Gear.OnEnable", boost::bind(&LLPanelWearing::isActionEnabled, mPanelWearing, _2));
- mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(
+ mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_wearing_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
llassert(mMenu);
}
- LLMenuGL* getMenu() { return mMenu; }
+ LLToggleableMenu* getMenu() { return mMenu; }
private:
@@ -79,8 +81,8 @@ private:
}
}
- LLMenuGL* mMenu;
- LLPanelWearing* mPanelWearing;
+ LLToggleableMenu* mMenu;
+ LLPanelWearing* mPanelWearing;
};
//////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index 408270a1a0..29e262199e 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -205,24 +205,6 @@ BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)
return LLFolderView::handleRightMouseDown(x, y, mask);
}
-BOOL LLPlacesFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
-{
- // Don't accept anything except landmarks and folders to be dropped
- // in places folder view. See STORM-296.
- if (cargo_type != DAD_LANDMARK && cargo_type != DAD_CATEGORY)
- {
- *accept = ACCEPT_NO;
- return FALSE;
- }
-
- return LLFolderView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data,
- accept, tooltip_msg);
-}
-
void LLPlacesFolderView::setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle)
{
mMenuHandlesByInventoryType[asset_type] = menu_handle;
diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h
index a44776d18b..6641871a0b 100644
--- a/indra/newview/llplacesinventorypanel.h
+++ b/indra/newview/llplacesinventorypanel.h
@@ -70,12 +70,6 @@ public:
*/
/*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg);
-
void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle);
void setParentLandmarksPanel(LLLandmarksPanel* panel)
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 18c9ac28c1..61f4897ed0 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -369,7 +369,7 @@ void LLScreenChannel::loadStoredToastsToChannel()
for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it)
{
(*it).toast->setIsHidden(false);
- (*it).toast->resetTimer();
+ (*it).toast->startFading();
mToastList.push_back((*it));
}
@@ -394,7 +394,7 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id)
}
toast->setIsHidden(false);
- toast->resetTimer();
+ toast->startFading();
mToastList.push_back((*it));
redrawToasts();
@@ -477,7 +477,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
toast->removeChild(old_panel);
delete old_panel;
toast->insertPanel(panel);
- toast->resetTimer();
+ toast->startFading();
redrawToasts();
}
}
@@ -588,7 +588,7 @@ void LLScreenChannel::showToastsBottom()
mHiddenToastsNum = 0;
for(; it != mToastList.rend(); it++)
{
- (*it).toast->stopTimer();
+ (*it).toast->stopFading();
(*it).toast->setVisible(FALSE);
mHiddenToastsNum++;
}
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index fb984a7c62..960e72ee42 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1555,7 +1555,9 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1)
{
- if (earlyFail(camera, this))
+ // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension
+ if ((mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER && !gGLManager.mHasDepthClamp) ||
+ earlyFail(camera, this))
{
setOcclusionState(LLSpatialGroup::DISCARD_QUERY);
assert_states_valid(this);
@@ -1576,7 +1578,18 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
buildOcclusion();
}
-
+
+ // Depth clamp all water to avoid it being culled as a result of being
+ // behind the far clip plane, and in the case of edge water to avoid
+ // it being culled while still visible.
+ bool const use_depth_clamp = gGLManager.mHasDepthClamp &&
+ (mSpatialPartition->mDrawableType == LLDrawPool::POOL_WATER ||
+ mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER);
+ if (use_depth_clamp)
+ {
+ glEnable(GL_DEPTH_CLAMP);
+ }
+
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, mOcclusionQuery[LLViewerCamera::sCurCameraID]);
glVertexPointer(3, GL_FLOAT, 0, mOcclusionVerts);
if (camera->getOrigin().isExactlyZero())
@@ -1592,6 +1605,11 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
GL_UNSIGNED_BYTE, get_box_fan_indices(camera, mBounds[0]));
}
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
+
+ if (use_depth_clamp)
+ {
+ glDisable(GL_DEPTH_CLAMP);
+ }
}
setOcclusionState(LLSpatialGroup::QUERY_PENDING);
@@ -2591,9 +2609,10 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
gGL.color4f(0.5f,0.5f,0.5f,1.0f);
break;
case LLViewerObject::LL_VO_PART_GROUP:
- case LLViewerObject::LL_VO_HUD_PART_GROUP:
+ case LLViewerObject::LL_VO_HUD_PART_GROUP:
gGL.color4f(0,0,1,1);
break;
+ case LLViewerObject::LL_VO_VOID_WATER:
case LLViewerObject::LL_VO_WATER:
gGL.color4f(0,0.5f,1,1);
break;
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 1a25f3f85d..2b9cf6c630 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -551,6 +551,13 @@ public:
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
};
+//spatial partition for hole and edge water (implemented in LLVOWater.cpp)
+class LLVoidWaterPartition : public LLWaterPartition
+{
+public:
+ LLVoidWaterPartition();
+};
+
//spatial partition for terrain (impelmented in LLVOSurfacePatch.cpp)
class LLTerrainPartition : public LLSpatialPartition
{
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index af4d9fa7b9..6fc8153b77 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -1162,8 +1162,13 @@ void LLSurface::setWaterHeight(F32 height)
if (!mWaterObjp.isNull())
{
LLVector3 water_pos_region = mWaterObjp->getPositionRegion();
+ bool changed = water_pos_region.mV[VZ] != height;
water_pos_region.mV[VZ] = height;
mWaterObjp->setPositionRegion(water_pos_region);
+ if (changed)
+ {
+ LLWorld::getInstance()->updateWaterObjects();
+ }
}
else
{
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index c3090cb1fc..8176b8c1f9 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -35,6 +35,13 @@
using namespace LLNotificationsUI;
+//--------------------------------------------------------------------------
+LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period)
+ : mToast(toast),
+ LLEventTimer(period)
+{
+}
+
/*virtual*/
BOOL LLToastLifeTimer::tick()
{
@@ -45,6 +52,38 @@ BOOL LLToastLifeTimer::tick()
return FALSE;
}
+void LLToastLifeTimer::stop()
+{
+ mEventTimer.stop();
+}
+
+void LLToastLifeTimer::start()
+{
+ mEventTimer.start();
+}
+
+void LLToastLifeTimer::restart()
+{
+ mEventTimer.reset();
+}
+
+BOOL LLToastLifeTimer::getStarted()
+{
+ return mEventTimer.getStarted();
+}
+
+void LLToastLifeTimer::setPeriod(F32 period)
+{
+ mPeriod = period;
+}
+
+F32 LLToastLifeTimer::getRemainingTimeF32()
+{
+ F32 et = mEventTimer.getElapsedTimeF32();
+ if (!getStarted() || et > mPeriod) return 0.0f;
+ return mPeriod - et;
+}
+
//--------------------------------------------------------------------------
LLToast::Params::Params()
: can_fade("can_fade", true),
@@ -73,7 +112,8 @@ LLToast::LLToast(const LLToast::Params& p)
mIsHidden(false),
mHideBtnPressed(false),
mIsTip(p.is_tip),
- mWrapperPanel(NULL)
+ mWrapperPanel(NULL),
+ mIsTransparent(false)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
@@ -143,6 +183,7 @@ LLToast::~LLToast()
void LLToast::hide()
{
setVisible(FALSE);
+ setTransparentState(false);
mTimer->stop();
mIsHidden = true;
mOnFadeSignal(this);
@@ -166,6 +207,16 @@ void LLToast::onFocusReceived()
}
}
+void LLToast::setLifetime(S32 seconds)
+{
+ mToastLifetime = seconds;
+}
+
+void LLToast::setFadingTime(S32 seconds)
+{
+ mToastFadingTime = seconds;
+}
+
S32 LLToast::getTopPad()
{
if(mWrapperPanel)
@@ -195,13 +246,46 @@ void LLToast::setCanFade(bool can_fade)
//--------------------------------------------------------------------------
void LLToast::expire()
{
- // if toast has fade property - hide it
- if(mCanFade)
+ if (mCanFade)
{
- hide();
+ if (mIsTransparent)
+ {
+ hide();
+ }
+ else
+ {
+ setTransparentState(true);
+ mTimer->restart();
+ }
}
}
+void LLToast::setTransparentState(bool transparent)
+{
+ setBackgroundOpaque(!transparent);
+ mIsTransparent = transparent;
+
+ if (transparent)
+ {
+ mTimer->setPeriod(mToastFadingTime);
+ }
+ else
+ {
+ mTimer->setPeriod(mToastLifetime);
+ }
+}
+
+F32 LLToast::getTimeLeftToLive()
+{
+ F32 time_to_live = mTimer->getRemainingTimeF32();
+
+ if (!mIsTransparent)
+ {
+ time_to_live += mToastFadingTime;
+ }
+
+ return time_to_live;
+}
//--------------------------------------------------------------------------
void LLToast::reshapeToPanel()
@@ -245,13 +329,6 @@ void LLToast::draw()
drawChild(mHideBtn);
}
}
-
- // if timer started and remaining time <= fading time
- if (mTimer->getStarted() && (mToastLifetime
- - mTimer->getEventTimer().getElapsedTimeF32()) <= mToastFadingTime)
- {
- setBackgroundOpaque(FALSE);
- }
}
//--------------------------------------------------------------------------
@@ -267,6 +344,11 @@ void LLToast::setVisible(BOOL show)
return;
}
+ if (show && getVisible())
+ {
+ return;
+ }
+
if(show)
{
setBackgroundOpaque(TRUE);
@@ -372,7 +454,8 @@ void LLNotificationsUI::LLToast::stopFading()
{
if(mCanFade)
{
- stopTimer();
+ setTransparentState(false);
+ mTimer->stop();
}
}
@@ -380,7 +463,8 @@ void LLNotificationsUI::LLToast::startFading()
{
if(mCanFade)
{
- resetTimer();
+ setTransparentState(false);
+ mTimer->start();
}
}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 0a96c092a0..fb534561c9 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -49,14 +49,16 @@ class LLToast;
class LLToastLifeTimer: public LLEventTimer
{
public:
- LLToastLifeTimer(LLToast* toast, F32 period) : mToast(toast), LLEventTimer(period){}
+ LLToastLifeTimer(LLToast* toast, F32 period);
/*virtual*/
BOOL tick();
- void stop() { mEventTimer.stop(); }
- void start() { mEventTimer.start(); }
- void restart() {mEventTimer.reset(); }
- BOOL getStarted() { return mEventTimer.getStarted(); }
+ void stop();
+ void start();
+ void restart();
+ BOOL getStarted();
+ void setPeriod(F32 period);
+ F32 getRemainingTimeF32();
LLTimer& getEventTimer() { return mEventTimer;}
private :
@@ -80,8 +82,14 @@ public:
Optional<LLUUID> notif_id, //notification ID
session_id; //im session ID
Optional<LLNotificationPtr> notification;
- Optional<F32> lifetime_secs,
- fading_time_secs; // Number of seconds while a toast is fading
+
+ //NOTE: Life time of a toast (i.e. period of time from the moment toast was shown
+ //till the moment when toast was hidden) is the sum of lifetime_secs and fading_time_secs.
+
+ Optional<F32> lifetime_secs, // Number of seconds while a toast is non-transparent
+ fading_time_secs; // Number of seconds while a toast is transparent
+
+
Optional<toast_callback_t> on_delete_toast,
on_mouse_enter;
Optional<bool> can_fade,
@@ -125,10 +133,8 @@ public:
LLPanel* getPanel() { return mPanel; }
// enable/disable Toast's Hide button
void setHideButtonEnabled(bool enabled);
- //
- void resetTimer() { mTimer->start(); }
//
- void stopTimer() { mTimer->stop(); }
+ F32 getTimeLeftToLive();
//
LLToastLifeTimer* getTimer() { return mTimer.get();}
//
@@ -144,6 +150,10 @@ public:
/*virtual*/ void onFocusReceived();
+ void setLifetime(S32 seconds);
+
+ void setFadingTime(S32 seconds);
+
/**
* Returns padding between floater top and wrapper_panel top.
* This padding should be taken into account when positioning or reshaping toasts
@@ -196,7 +206,9 @@ private:
void onToastMouseLeave();
- void expire();
+ void expire();
+
+ void setTransparentState(bool transparent);
LLUUID mNotificationID;
LLUUID mSessionID;
@@ -222,6 +234,7 @@ private:
bool mHideBtnPressed;
bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
bool mIsTip;
+ bool mIsTransparent;
commit_signal_t mToastMouseEnterSignal;
commit_signal_t mToastMouseLeaveSignal;
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 6640e32cd2..d1cb9dabf1 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -573,7 +573,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
S32 water_clip = 0;
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT) > 1) &&
- gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER))
+ (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER) ||
+ gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_VOIDWATER)))
{
if (LLViewerCamera::getInstance()->cameraUnderWater())
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index ccf3df827d..1778eaed68 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -221,8 +221,6 @@ BOOL check_show_xui_names(void *);
// Debug UI
void handle_buy_currency_test(void*);
-void handle_save_to_xml(void*);
-void handle_load_from_xml(void*);
void handle_god_mode(void*);
@@ -1384,37 +1382,6 @@ class LLAdvancedCheckDebugWindowProc : public view_listener_t
// ------------------------------XUI MENU ---------------------------
-//////////////////////
-// LOAD UI FROM XML //
-//////////////////////
-
-
-class LLAdvancedLoadUIFromXML : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- handle_load_from_xml(NULL);
- return true;
-}
-};
-
-
-
-////////////////////
-// SAVE UI TO XML //
-////////////////////
-
-
-class LLAdvancedSaveUIToXML : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- handle_save_to_xml(NULL);
- return true;
-}
-};
-
-
class LLAdvancedSendTestIms : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -4160,6 +4127,11 @@ class LLObjectEnableReturn : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
+ if (LLSelectMgr::getInstance()->getSelection()->isEmpty())
+ {
+ // Do not enable if nothing selected
+ return false;
+ }
#ifdef HACKED_GODLIKE_VIEWER
bool new_value = true;
#else
@@ -7183,44 +7155,6 @@ const LLRect LLViewerMenuHolderGL::getMenuRect() const
return LLRect(0, getRect().getHeight() - MENU_BAR_HEIGHT, getRect().getWidth(), STATUS_BAR_HEIGHT);
}
-void handle_save_to_xml(void*)
-{
- LLFloater* frontmost = gFloaterView->getFrontmost();
- if (!frontmost)
- {
- LLNotificationsUtil::add("NoFrontmostFloater");
- return;
- }
-
- std::string default_name = "floater_";
- default_name += frontmost->getTitle();
- default_name += ".xml";
-
- LLStringUtil::toLower(default_name);
- LLStringUtil::replaceChar(default_name, ' ', '_');
- LLStringUtil::replaceChar(default_name, '/', '_');
- LLStringUtil::replaceChar(default_name, ':', '_');
- LLStringUtil::replaceChar(default_name, '"', '_');
-
- LLFilePicker& picker = LLFilePicker::instance();
- if (picker.getSaveFile(LLFilePicker::FFSAVE_XML, default_name))
- {
- std::string filename = picker.getFirstFile();
- LLUICtrlFactory::getInstance()->saveToXML(frontmost, filename);
- }
-}
-
-void handle_load_from_xml(void*)
-{
- LLFilePicker& picker = LLFilePicker::instance();
- if (picker.getOpenFile(LLFilePicker::FFLOAD_XML))
- {
- std::string filename = picker.getFirstFile();
- LLFloater* floater = new LLFloater(LLSD());
- floater->buildFromFile(filename);
- }
-}
-
void handle_web_browser_test(const LLSD& param)
{
std::string url = param.asString();
@@ -8006,8 +7940,6 @@ void initialize_menus()
// Advanced > XUI
commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance()));
- view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML");
- view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML");
view_listener_t::addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames");
view_listener_t::addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames");
view_listener_t::addMenu(new LLAdvancedSendTestIms(), "Advanced.SendTestIMs");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9b1f2e67c6..672213d3e8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1511,7 +1511,12 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// MUTE falls through to decline
case IOR_DECLINE:
{
- log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +".";
+ {
+ LLStringUtil::format_map_t log_message_args;
+ log_message_args["DESC"] = mDesc;
+ log_message_args["NAME"] = mFromName;
+ log_message = LLTrans::getString("InvOfferDecline", log_message_args);
+ }
chat.mText = log_message;
if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269
{
@@ -1710,8 +1715,12 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE);
// send the message
msg->sendReliable(mHost);
-
- log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +".";
+ {
+ LLStringUtil::format_map_t log_message_args;
+ log_message_args["DESC"] = mDesc;
+ log_message_args["NAME"] = mFromName;
+ log_message = LLTrans::getString("InvOfferDecline", log_message_args);
+ }
LLSD args;
args["MESSAGE"] = log_message;
LLNotificationsUtil::add("SystemMessage", args);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a58b0d68de..0e1553c421 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -168,8 +168,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
res = new LLVOSurfacePatch(id, pcode, regionp); break;
case LL_VO_SKY:
res = new LLVOSky(id, pcode, regionp); break;
+ case LL_VO_VOID_WATER:
+ res = new LLVOVoidWater(id, pcode, regionp); break;
case LL_VO_WATER:
- res = new LLVOWater(id, pcode, regionp); break;
+ res = new LLVOWater(id, pcode, regionp); break;
case LL_VO_GROUND:
res = new LLVOGround(id, pcode, regionp); break;
case LL_VO_PART_GROUP:
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 7d697a4a5f..c2475c2709 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -131,7 +131,7 @@ public:
typedef const child_list_t const_child_list_t;
- LLViewerObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp, BOOL is_global = FALSE);
+ LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE);
MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT);
virtual void markDead(); // Mark this object as dead, and clean up its references
@@ -518,14 +518,14 @@ public:
{
LL_VO_CLOUDS = LL_PCODE_APP | 0x20,
LL_VO_SURFACE_PATCH = LL_PCODE_APP | 0x30,
- //LL_VO_STARS = LL_PCODE_APP | 0x40,
+ LL_VO_WL_SKY = LL_PCODE_APP | 0x40,
LL_VO_SQUARE_TORUS = LL_PCODE_APP | 0x50,
LL_VO_SKY = LL_PCODE_APP | 0x60,
- LL_VO_WATER = LL_PCODE_APP | 0x70,
- LL_VO_GROUND = LL_PCODE_APP | 0x80,
- LL_VO_PART_GROUP = LL_PCODE_APP | 0x90,
- LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xa0,
- LL_VO_WL_SKY = LL_PCODE_APP | 0xb0, // should this be moved to 0x40?
+ LL_VO_VOID_WATER = LL_PCODE_APP | 0x70,
+ LL_VO_WATER = LL_PCODE_APP | 0x80,
+ LL_VO_GROUND = LL_PCODE_APP | 0x90,
+ LL_VO_PART_GROUP = LL_PCODE_APP | 0xa0,
+ LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xb0,
LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xc0,
} EVOType;
@@ -717,8 +717,8 @@ public:
class LLAlphaObject : public LLViewerObject
{
public:
- LLAlphaObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp)
- : LLViewerObject(id,type,regionp)
+ LLAlphaObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
+ : LLViewerObject(id,pcode,regionp)
{ mDepth = 0.f; }
virtual F32 getPartSize(S32 idx);
@@ -735,8 +735,8 @@ public:
class LLStaticViewerObject : public LLViewerObject
{
public:
- LLStaticViewerObject(const LLUUID& id, const LLPCode type, LLViewerRegion* regionp, BOOL is_global = FALSE)
- : LLViewerObject(id,type,regionp, is_global)
+ LLStaticViewerObject(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp, BOOL is_global = FALSE)
+ : LLViewerObject(id,pcode,regionp, is_global)
{ }
virtual void updateDrawable(BOOL force_damped);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 7fb259e012..b684206960 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -266,6 +266,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
//MUST MATCH declaration of eObjectPartitions
mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD
mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN
+ mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER
mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER
mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE
mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 1ba025312b..8b71998f60 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -73,6 +73,7 @@ public:
{
PARTITION_HUD=0,
PARTITION_TERRAIN,
+ PARTITION_VOIDWATER,
PARTITION_WATER,
PARTITION_TREE,
PARTITION_PARTICLE,
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index d078c15316..c1abead36e 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -335,8 +335,8 @@ void LLViewerShaderMgr::setShaders()
}
else
{
- LLPipeline::sRenderGlow =
- LLPipeline::sWaterReflections = FALSE;
+ LLPipeline::sRenderGlow = FALSE;
+ LLPipeline::sWaterReflections = FALSE;
}
//hack to reset buffers that change behavior with shaders
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index a0a3380441..0e494e90ee 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1404,6 +1404,11 @@ LLViewerWindow::LLViewerWindow(
gSavedSettings.setBOOL("ProbeHardwareOnStartup", FALSE);
}
+ if (!gGLManager.mHasDepthClamp)
+ {
+ LL_INFOS("RenderInit") << "Missing feature GL_ARB_depth_clamp. Void water might disappear in rare cases." << LL_ENDL;
+ }
+
// If we crashed while initializng GL stuff last time, disable certain features
if (gSavedSettings.getBOOL("RenderInitError"))
{
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index eba600b50a..2eb4398488 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -80,7 +80,7 @@ public:
//============================================================================
LLVOSurfacePatch::LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
- : LLStaticViewerObject(id, LL_VO_SURFACE_PATCH, regionp),
+ : LLStaticViewerObject(id, pcode, regionp),
mDirtiedPatch(FALSE),
mPool(NULL),
mBaseComp(0),
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 598938b710..9280eb8fa4 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -61,7 +61,8 @@ const F32 WAVE_STEP_INV = (1. / WAVE_STEP);
LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
-: LLStaticViewerObject(id, LL_VO_WATER, regionp)
+: LLStaticViewerObject(id, pcode, regionp),
+ mRenderType(LLPipeline::RENDER_TYPE_WATER)
{
// Terrain must draw during selection passes so it can block objects behind it.
mbCanSelect = FALSE;
@@ -114,7 +115,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
{
pipeline->allocDrawable(this);
mDrawable->setLit(FALSE);
- mDrawable->setRenderType(LLPipeline::RENDER_TYPE_WATER);
+ mDrawable->setRenderType(mRenderType);
LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER);
@@ -268,6 +269,11 @@ U32 LLVOWater::getPartitionType() const
return LLViewerRegion::PARTITION_WATER;
}
+U32 LLVOVoidWater::getPartitionType() const
+{
+ return LLViewerRegion::PARTITION_VOIDWATER;
+}
+
LLWaterPartition::LLWaterPartition()
: LLSpatialPartition(0, FALSE, 0)
{
@@ -275,3 +281,9 @@ LLWaterPartition::LLWaterPartition()
mDrawableType = LLPipeline::RENDER_TYPE_WATER;
mPartitionType = LLViewerRegion::PARTITION_WATER;
}
+
+LLVoidWaterPartition::LLVoidWaterPartition()
+{
+ mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER;
+ mPartitionType = LLViewerRegion::PARTITION_VOIDWATER;
+}
diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h
index beefc3f17f..cb9584cabf 100644
--- a/indra/newview/llvowater.h
+++ b/indra/newview/llvowater.h
@@ -29,6 +29,7 @@
#include "llviewerobject.h"
#include "llviewertexture.h"
+#include "pipeline.h"
#include "v2math.h"
const U32 N_RES = 16; //32 // number of subdivisions of wave tile
@@ -77,6 +78,19 @@ public:
protected:
BOOL mUseTexture;
BOOL mIsEdgePatch;
+ S32 mRenderType;
};
+class LLVOVoidWater : public LLVOWater
+{
+public:
+ LLVOVoidWater(LLUUID const& id, LLPCode pcode, LLViewerRegion* regionp) : LLVOWater(id, pcode, regionp)
+ {
+ mRenderType = LLPipeline::RENDER_TYPE_VOIDWATER;
+ }
+
+ /*virtual*/ U32 getPartitionType() const;
+};
+
+
#endif // LL_VOSURFACEPATCH_H
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 5760d04a08..8731c9e1a7 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -55,6 +55,11 @@
#include "pipeline.h"
#include "llappviewer.h" // for do_disconnect()
+#include <deque>
+#include <queue>
+#include <map>
+#include <cstring>
+
//
// Globals
//
@@ -834,10 +839,69 @@ F32 LLWorld::getLandFarClip() const
void LLWorld::setLandFarClip(const F32 far_clip)
{
+ static S32 const rwidth = (S32)REGION_WIDTH_U32;
+ S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth;
+ S32 const n2 = (llceil(far_clip) - 1) / rwidth;
+ bool need_water_objects_update = n1 != n2;
+
mLandFarClip = far_clip;
+
+ if (need_water_objects_update)
+ {
+ updateWaterObjects();
+ }
}
+// Some region that we're connected to, but not the one we're in, gave us
+// a (possibly) new water height. Update it in our local copy.
+void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_height)
+{
+ for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter)
+ {
+ if ((*iter)->getName() == sim_name)
+ {
+ (*iter)->setWaterHeight(water_height);
+ break;
+ }
+ }
+}
+// There are three types of water objects:
+// Region water objects: the water in a region.
+// Hole water objects: water in the void but within current draw distance.
+// Edge water objects: the water outside the draw distance, up till the horizon.
+//
+// For example:
+//
+// -----------------------horizon-------------------------
+// | | | |
+// | Edge Water | | |
+// | | | |
+// | | | |
+// | | | |
+// | | | |
+// | | rwidth | |
+// | | <-----> | |
+// -------------------------------------------------------
+// | |Hole |other| | |
+// | |Water|reg. | | |
+// | |-----------------| |
+// | |other|cur. |<--> | |
+// | |reg. | reg.| \__|_ draw distance |
+// | |-----------------| |
+// | | | |<--->| |
+// | | | | \__|_ range |
+// -------------------------------------------------------
+// | |<----width------>|<--horizon ext.->|
+// | | | |
+// | | | |
+// | | | |
+// | | | |
+// | | | |
+// | | | |
+// | | | |
+// -------------------------------------------------------
+//
void LLWorld::updateWaterObjects()
{
if (!gAgent.getRegion())
@@ -850,128 +914,265 @@ void LLWorld::updateWaterObjects()
return;
}
- // First, determine the min and max "box" of water objects
- S32 min_x = 0;
- S32 min_y = 0;
- S32 max_x = 0;
- S32 max_y = 0;
+ // Region width in meters.
+ S32 const rwidth = (S32)REGION_WIDTH_U32;
+
+ // The distance we might see into the void
+ // when standing on the edge of a region, in meters.
+ S32 const draw_distance = llceil(mLandFarClip);
+
+ // We can only have "holes" in the water (where there no region) if we
+ // can have existing regions around it. Taking into account that this
+ // code is only executed when we enter a region, and not when we walk
+ // around in it, we (only) need to take into account regions that fall
+ // within the draw_distance.
+ //
+ // Set 'range' to draw_distance, rounded up to the nearest multiple of rwidth.
+ S32 const nsims = (draw_distance + rwidth - 1) / rwidth;
+ S32 const range = nsims * rwidth;
+
+ // Get South-West corner of current region.
+ LLViewerRegion const* regionp = gAgent.getRegion();
U32 region_x, region_y;
-
- S32 rwidth = 256;
-
- // We only want to fill in water for stuff that's near us, say, within 256 or 512m
- S32 range = LLViewerCamera::getInstance()->getFar() > 256.f ? 512 : 256;
-
- LLViewerRegion* regionp = gAgent.getRegion();
from_region_handle(regionp->getHandle(), &region_x, &region_y);
- min_x = (S32)region_x - range;
- min_y = (S32)region_y - range;
- max_x = (S32)region_x + range;
- max_y = (S32)region_y + range;
+ // The min. and max. coordinates of the South-West corners of the Hole water objects.
+ S32 const min_x = (S32)region_x - range;
+ S32 const min_y = (S32)region_y - range;
+ S32 const max_x = (S32)region_x + range;
+ S32 const max_y = (S32)region_y + range;
+
+ // Attempt to determine a sensible water height for all the
+ // Hole Water objects.
+ //
+ // It make little sense to try to guess what the best water
+ // height should be when that isn't completely obvious: if it's
+ // impossible to satisfy every region's water height without
+ // getting a jump in the water height.
+ //
+ // In order to keep the reasoning simple, we assume something
+ // logical as a group of connected regions, where the coastline
+ // is at the outer edge. Anything more complex that would "break"
+ // under such an assumption would probably break anyway (would
+ // depend on terrain editing and existing mega prims, say, if
+ // anything would make sense at all).
+ //
+ // So, what we do is find all connected regions within the
+ // draw distance that border void, and then pick the lowest
+ // water height of those (coast) regions.
+ S32 const n = 2 * nsims + 1;
+ S32 const origin = nsims + nsims * n;
+ std::vector<F32> water_heights(n * n);
+ std::vector<U8> checked(n * n, 0); // index = nx + ny * n + origin;
+ U8 const region_bit = 1;
+ U8 const hole_bit = 2;
+ U8 const bordering_hole_bit = 4;
+ U8 const bordering_edge_bit = 8;
+ // Use the legacy waterheight for the Edge water in the case
+ // that we don't find any Hole water at all.
+ F32 water_height = DEFAULT_WATER_HEIGHT;
+ int max_count = 0;
+ LL_DEBUGS("WaterHeight") << "Current region: " << regionp->getName() << "; water height: " << regionp->getWaterHeight() << " m." << LL_ENDL;
+ std::map<S32, int> water_height_counts;
+ typedef std::queue<std::pair<S32, S32>, std::deque<std::pair<S32, S32> > > nxny_pairs_type;
+ nxny_pairs_type nxny_pairs;
+ nxny_pairs.push(nxny_pairs_type::value_type(0, 0));
+ water_heights[origin] = regionp->getWaterHeight();
+ checked[origin] = region_bit;
+ // For debugging purposes.
+ int number_of_connected_regions = 1;
+ int uninitialized_regions = 0;
+ int bordering_hole = 0;
+ int bordering_edge = 0;
+ while(!nxny_pairs.empty())
+ {
+ S32 const nx = nxny_pairs.front().first;
+ S32 const ny = nxny_pairs.front().second;
+ LL_DEBUGS("WaterHeight") << "nx,ny = " << nx << "," << ny << LL_ENDL;
+ S32 const index = nx + ny * n + origin;
+ nxny_pairs.pop();
+ for (S32 dir = 0; dir < 4; ++dir)
+ {
+ S32 const cnx = nx + gDirAxes[dir][0];
+ S32 const cny = ny + gDirAxes[dir][1];
+ LL_DEBUGS("WaterHeight") << "dir = " << dir << "; cnx,cny = " << cnx << "," << cny << LL_ENDL;
+ S32 const cindex = cnx + cny * n + origin;
+ bool is_hole = false;
+ bool is_edge = false;
+ LLViewerRegion* new_region_found = NULL;
+ if (cnx < -nsims || cnx > nsims ||
+ cny < -nsims || cny > nsims)
+ {
+ LL_DEBUGS("WaterHeight") << " Edge Water!" << LL_ENDL;
+ // Bumped into Edge water object.
+ is_edge = true;
+ }
+ else if (checked[cindex])
+ {
+ LL_DEBUGS("WaterHeight") << " Already checked before!" << LL_ENDL;
+ // Already checked.
+ is_hole = (checked[cindex] & hole_bit);
+ }
+ else
+ {
+ S32 x = (S32)region_x + cnx * rwidth;
+ S32 y = (S32)region_y + cny * rwidth;
+ U64 region_handle = to_region_handle(x, y);
+ new_region_found = getRegionFromHandle(region_handle);
+ is_hole = !new_region_found;
+ checked[cindex] = is_hole ? hole_bit : region_bit;
+ }
+ if (is_hole)
+ {
+ // This was a region that borders at least one 'hole'.
+ // Count the found coastline.
+ F32 new_water_height = water_heights[index];
+ LL_DEBUGS("WaterHeight") << " This is void; counting coastline with water height of " << new_water_height << LL_ENDL;
+ S32 new_water_height_cm = llround(new_water_height * 100);
+ int count = (water_height_counts[new_water_height_cm] += 1);
+ // Just use the lowest water height: this is mainly about the horizon water,
+ // and whatever we do, we don't want it to be possible to look under the water
+ // when looking in the distance: it is better to make a step downwards in water
+ // height when going away from the avie than a step upwards. However, since
+ // everyone is used to DEFAULT_WATER_HEIGHT, don't allow a single region
+ // to drag the water level below DEFAULT_WATER_HEIGHT on it's own.
+ if (bordering_hole == 0 || // First time we get here.
+ (new_water_height >= DEFAULT_WATER_HEIGHT &&
+ new_water_height < water_height) ||
+ (new_water_height < DEFAULT_WATER_HEIGHT &&
+ count > max_count)
+ )
+ {
+ water_height = new_water_height;
+ }
+ if (count > max_count)
+ {
+ max_count = count;
+ }
+ if (!(checked[index] & bordering_hole_bit))
+ {
+ checked[index] |= bordering_hole_bit;
+ ++bordering_hole;
+ }
+ }
+ else if (is_edge && !(checked[index] & bordering_edge_bit))
+ {
+ checked[index] |= bordering_edge_bit;
+ ++bordering_edge;
+ }
+ if (!new_region_found)
+ {
+ // Dead end, there is no region here.
+ continue;
+ }
+ // Found a new connected region.
+ ++number_of_connected_regions;
+ if (new_region_found->getName().empty())
+ {
+ // Uninitialized LLViewerRegion, don't use it's water height.
+ LL_DEBUGS("WaterHeight") << " Uninitialized region." << LL_ENDL;
+ ++uninitialized_regions;
+ continue;
+ }
+ nxny_pairs.push(nxny_pairs_type::value_type(cnx, cny));
+ water_heights[cindex] = new_region_found->getWaterHeight();
+ LL_DEBUGS("WaterHeight") << " Found a new region (name: " << new_region_found->getName() << "; water height: " << water_heights[cindex] << " m)!" << LL_ENDL;
+ }
+ }
+ llinfos << "Number of connected regions: " << number_of_connected_regions << " (" << uninitialized_regions <<
+ " uninitialized); number of regions bordering Hole water: " << bordering_hole <<
+ "; number of regions bordering Edge water: " << bordering_edge << llendl;
+ llinfos << "Coastline count (height, count): ";
+ bool first = true;
+ for (std::map<S32, int>::iterator iter = water_height_counts.begin(); iter != water_height_counts.end(); ++iter)
+ {
+ if (!first) llcont << ", ";
+ llcont << "(" << (iter->first / 100.f) << ", " << iter->second << ")";
+ first = false;
+ }
+ llcont << llendl;
+ llinfos << "Water height used for Hole and Edge water objects: " << water_height << llendl;
- F32 height = 0.f;
-
- for (region_list_t::iterator iter = mRegionList.begin();
- iter != mRegionList.end(); ++iter)
+ // Update all Region water objects.
+ for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
LLVOWater* waterp = regionp->getLand().getWaterObj();
- height += regionp->getWaterHeight();
if (waterp)
{
gObjectList.updateActive(waterp);
}
}
+ // Clean up all existing Hole water objects.
for (std::list<LLVOWater*>::iterator iter = mHoleWaterObjects.begin();
- iter != mHoleWaterObjects.end(); ++ iter)
+ iter != mHoleWaterObjects.end(); ++iter)
{
LLVOWater* waterp = *iter;
gObjectList.killObject(waterp);
}
mHoleWaterObjects.clear();
- // Now, get a list of the holes
- S32 x, y;
- for (x = min_x; x <= max_x; x += rwidth)
+ // Let the Edge and Hole water boxes be 1024 meter high so that they
+ // are never too small to be drawn (A LL_VO_*_WATER box has water
+ // rendered on it's bottom surface only), and put their bottom at
+ // the current regions water height.
+ F32 const box_height = 1024;
+ F32 const water_center_z = water_height + box_height / 2;
+
+ // Create new Hole water objects within 'range' where there is no region.
+ for (S32 x = min_x; x <= max_x; x += rwidth)
{
- for (y = min_y; y <= max_y; y += rwidth)
+ for (S32 y = min_y; y <= max_y; y += rwidth)
{
U64 region_handle = to_region_handle(x, y);
if (!getRegionFromHandle(region_handle))
{
- LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion());
+ LLVOWater* waterp = (LLVOWater*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion());
waterp->setUseTexture(FALSE);
- waterp->setPositionGlobal(LLVector3d(x + rwidth/2,
- y + rwidth/2,
- 256.f+DEFAULT_WATER_HEIGHT));
- waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f));
+ waterp->setPositionGlobal(LLVector3d(x + rwidth / 2, y + rwidth / 2, water_center_z));
+ waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, box_height));
gPipeline.createObject(waterp);
mHoleWaterObjects.push_back(waterp);
}
}
}
- // Update edge water objects
- S32 wx, wy;
- S32 center_x, center_y;
- wx = (max_x - min_x) + rwidth;
- wy = (max_y - min_y) + rwidth;
- center_x = min_x + (wx >> 1);
- center_y = min_y + (wy >> 1);
-
- S32 add_boundary[4] = {
- 512 - (max_x - region_x),
- 512 - (max_y - region_y),
- 512 - (region_x - min_x),
- 512 - (region_y - min_y) };
+ // Center of the region.
+ S32 const center_x = region_x + rwidth / 2;
+ S32 const center_y = region_y + rwidth / 2;
+ // Width of the area with Hole water objects.
+ S32 const width = rwidth + 2 * range;
+ S32 const horizon_extend = 2048 + 512 - range; // Legacy value.
+ // The overlap is needed to get rid of sky pixels being visible between the
+ // Edge and Hole water object at greater distances (due to floating point
+ // round off errors).
+ S32 const edge_hole_overlap = 1; // Twice the actual overlap.
- S32 dir;
- for (dir = 0; dir < 8; dir++)
+ for (S32 dir = 0; dir < 8; ++dir)
{
- S32 dim[2] = { 0 };
- switch (gDirAxes[dir][0])
- {
- case -1: dim[0] = add_boundary[2]; break;
- case 0: dim[0] = wx; break;
- default: dim[0] = add_boundary[0]; break;
- }
- switch (gDirAxes[dir][1])
- {
- case -1: dim[1] = add_boundary[3]; break;
- case 0: dim[1] = wy; break;
- default: dim[1] = add_boundary[1]; break;
- }
+ // Size of the Edge water objects.
+ S32 const dim_x = (gDirAxes[dir][0] == 0) ? width : (horizon_extend + edge_hole_overlap);
+ S32 const dim_y = (gDirAxes[dir][1] == 0) ? width : (horizon_extend + edge_hole_overlap);
+ // And their position.
+ S32 const water_center_x = center_x + (width + horizon_extend) / 2 * gDirAxes[dir][0];
+ S32 const water_center_y = center_y + (width + horizon_extend) / 2 * gDirAxes[dir][1];
- // Resize and reshape the water objects
- const S32 water_center_x = center_x + llround((wx + dim[0]) * 0.5f * gDirAxes[dir][0]);
- const S32 water_center_y = center_y + llround((wy + dim[1]) * 0.5f * gDirAxes[dir][1]);
-
LLVOWater* waterp = mEdgeWaterObjects[dir];
if (!waterp || waterp->isDead())
{
// The edge water objects can be dead because they're attached to the region that the
// agent was in when they were originally created.
- mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER,
- gAgent.getRegion());
+ mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion());
waterp = mEdgeWaterObjects[dir];
waterp->setUseTexture(FALSE);
- waterp->setIsEdgePatch(TRUE);
+ waterp->setIsEdgePatch(TRUE); // Mark that this is edge water and not hole water.
gPipeline.createObject(waterp);
}
waterp->setRegion(gAgent.getRegion());
- LLVector3d water_pos(water_center_x, water_center_y,
- DEFAULT_WATER_HEIGHT+256.f);
- LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f);
-
- //stretch out to horizon
- water_scale.mV[0] += fabsf(2048.f * gDirAxes[dir][0]);
- water_scale.mV[1] += fabsf(2048.f * gDirAxes[dir][1]);
-
- water_pos.mdV[0] += 1024.f * gDirAxes[dir][0];
- water_pos.mdV[1] += 1024.f * gDirAxes[dir][1];
+ LLVector3d water_pos(water_center_x, water_center_y, water_center_z);
+ LLVector3 water_scale((F32) dim_x, (F32) dim_y, box_height);
waterp->setPositionGlobal(water_pos);
waterp->setScale(water_scale);
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index 4465fde210..c60dc8dc29 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -137,6 +137,7 @@ public:
LLViewerTexture *getDefaultWaterTexture();
void updateWaterObjects();
+ void waterHeightRegionInfo(std::string const& sim_name, F32 water_height);
void shiftRegions(const LLVector3& offset);
void setSpaceTimeUSec(const U64 space_time_usec);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 0c5735cdfc..56f55b8bd7 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -630,14 +630,14 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
//static
void LLPipeline::updateRenderDeferred()
{
- BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") &&
- LLRenderTarget::sUseFBO &&
- LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- gSavedSettings.getBOOL("VertexShaderEnable") &&
- gSavedSettings.getBOOL("RenderAvatarVP") &&
- (gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE) &&
- !gUseWireframe;
-
+ BOOL deferred = ((gSavedSettings.getBOOL("RenderDeferred") &&
+ LLRenderTarget::sUseFBO &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ gSavedSettings.getBOOL("VertexShaderEnable") &&
+ gSavedSettings.getBOOL("RenderAvatarVP") &&
+ gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE) &&
+ !gUseWireframe;
+
sRenderDeferred = deferred;
}
@@ -1639,20 +1639,14 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
camera.disableUserClipPlane();
- if (gSky.mVOSkyp.notNull() && gSky.mVOSkyp->mDrawable.notNull())
+ if (hasRenderType(LLPipeline::RENDER_TYPE_SKY) &&
+ gSky.mVOSkyp.notNull() &&
+ gSky.mVOSkyp->mDrawable.notNull())
{
- // Hack for sky - always visible.
- if (hasRenderType(LLPipeline::RENDER_TYPE_SKY))
- {
- gSky.mVOSkyp->mDrawable->setVisible(camera);
- sCull->pushDrawable(gSky.mVOSkyp->mDrawable);
- gSky.updateCull();
- stop_glerror();
- }
- }
- else
- {
- llinfos << "No sky drawable!" << llendl;
+ gSky.mVOSkyp->mDrawable->setVisible(camera);
+ sCull->pushDrawable(gSky.mVOSkyp->mDrawable);
+ gSky.updateCull();
+ stop_glerror();
}
if (hasRenderType(LLPipeline::RENDER_TYPE_GROUND) &&
@@ -2222,6 +2216,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_TREE,
LLPipeline::RENDER_TYPE_SKY,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
LLPipeline::RENDER_TYPE_WATER,
LLPipeline::END_RENDER_TYPES))
{
@@ -5013,6 +5008,10 @@ void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light)
void LLPipeline::toggleRenderType(U32 type)
{
gPipeline.mRenderTypeEnabled[type] = !gPipeline.mRenderTypeEnabled[type];
+ if (type == LLPipeline::RENDER_TYPE_WATER)
+ {
+ gPipeline.mRenderTypeEnabled[LLPipeline::RENDER_TYPE_VOIDWATER] = !gPipeline.mRenderTypeEnabled[LLPipeline::RENDER_TYPE_VOIDWATER];
+ }
}
//static
@@ -7340,6 +7339,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gPipeline.pushRenderTypeMask();
clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
LLPipeline::RENDER_TYPE_GROUND,
LLPipeline::RENDER_TYPE_SKY,
LLPipeline::RENDER_TYPE_CLOUDS,
@@ -7392,6 +7392,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
{
camera.setFar(camera_in.getFar());
clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
LLPipeline::RENDER_TYPE_GROUND,
END_RENDER_TYPES);
stop_glerror();
@@ -7908,6 +7909,7 @@ void LLPipeline::generateGI(LLCamera& camera, LLVector3& lightDir, std::vector<L
LLPipeline::RENDER_TYPE_TREE,
LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
LLPipeline::RENDER_TYPE_AVATAR,
LLPipeline::RENDER_TYPE_PASS_SIMPLE,
@@ -8091,6 +8093,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
LLPipeline::RENDER_TYPE_TREE,
LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
LLPipeline::RENDER_TYPE_PASS_SIMPLE,
LLPipeline::RENDER_TYPE_PASS_BUMP,
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index b80765dac6..790b595626 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -359,6 +359,7 @@ public:
RENDER_TYPE_AVATAR = LLDrawPool::POOL_AVATAR,
RENDER_TYPE_TREE = LLDrawPool::POOL_TREE,
RENDER_TYPE_INVISIBLE = LLDrawPool::POOL_INVISIBLE,
+ RENDER_TYPE_VOIDWATER = LLDrawPool::POOL_VOIDWATER,
RENDER_TYPE_WATER = LLDrawPool::POOL_WATER,
RENDER_TYPE_ALPHA = LLDrawPool::POOL_ALPHA,
RENDER_TYPE_GLOW = LLDrawPool::POOL_GLOW,
diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml
index 9f4119e73b..afd933c7fa 100644
--- a/indra/newview/skins/default/xui/da/strings.xml
+++ b/indra/newview/skins/default/xui/da/strings.xml
@@ -774,7 +774,7 @@
<string name="xml_file">
XML Fil
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
RAW Fil
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index ae2991df45..afcb68f537 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -798,7 +798,7 @@
<string name="xml_file">
XML-Datei
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
RAW-Datei
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/en/alert_line_editor.xml b/indra/newview/skins/default/xui/en/alert_line_editor.xml
index 82bf5fc8da..54dbc698c8 100644
--- a/indra/newview/skins/default/xui/en/alert_line_editor.xml
+++ b/indra/newview/skins/default/xui/en/alert_line_editor.xml
@@ -4,7 +4,7 @@
revert_on_esc="true"
commit_on_focus_lost="true"
ignore_tab="true"
- max_length="254"
+ max_length_bytes="254"
text_pad_right="0"
text_pad_left="2"
mouse_opaque="true"/>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 89ed16e7c2..0a27cc7bc9 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -128,7 +128,7 @@
height="23"
layout="topleft"
left_pad="2"
- max_length="63"
+ max_length_bytes="63"
name="Name"
top_delta="0"
width="365" />
@@ -1081,7 +1081,7 @@ Leyla Linden </text>
follows="left|top"
height="23"
layout="topleft"
- max_length="6"
+ max_length_bytes="6"
name="clean other time"
left_pad="0"
width="46"
@@ -1625,7 +1625,7 @@ Only large parcels can be listed in search.
height="23"
layout="topleft"
left_pad="0"
- max_length="255"
+ max_length_bytes="255"
name="media_url"
select_on_focus="true"
width="300"
@@ -1666,7 +1666,7 @@ Only large parcels can be listed in search.
height="20"
layout="topleft"
left="110"
- max_length="255"
+ max_length_bytes="255"
name="url_description"
select_on_focus="true"
tool_tip="Text displayed next to play/load button"
@@ -1821,7 +1821,7 @@ Only large parcels can be listed in search.
height="23"
layout="topleft"
left="100"
- max_length="255"
+ max_length_bytes="255"
name="music_url"
top_delta="0"
right="-15"
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 637f9f55d4..cd5922a9a2 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
@@ -114,7 +114,7 @@
</text>
<line_editor
type="string"
- max_length="10"
+ max_length_bytes="10"
halign="right"
font="SansSerifMedium"
select_on_focus="true"
diff --git a/indra/newview/skins/default/xui/en/floater_god_tools.xml b/indra/newview/skins/default/xui/en/floater_god_tools.xml
index dfe3cf4485..e7131e20cb 100644
--- a/indra/newview/skins/default/xui/en/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_god_tools.xml
@@ -73,7 +73,7 @@
height="20"
layout="topleft"
left_pad="0"
- max_length="63"
+ max_length_bytes="63"
name="region name"
top_delta="0"
width="250">
@@ -236,7 +236,7 @@
height="16"
layout="topleft"
left_delta="108"
- max_length="10"
+ max_length_bytes="10"
name="estate"
top_delta="0"
width="50" />
@@ -260,7 +260,7 @@
height="16"
layout="topleft"
left_delta="108"
- max_length="10"
+ max_length_bytes="10"
name="parentestate"
tool_tip="This is the parent estate for this region"
top_delta="0"
@@ -287,7 +287,7 @@
height="16"
layout="topleft"
left_delta="88"
- max_length="10"
+ max_length_bytes="10"
name="gridposx"
tool_tip="This is the grid x position for this region"
top_delta="0"
@@ -302,7 +302,7 @@
height="16"
layout="topleft"
left_pad="10"
- max_length="10"
+ max_length_bytes="10"
name="gridposy"
tool_tip="This is the grid y position for this region"
top_delta="0"
@@ -329,7 +329,7 @@
height="16"
layout="topleft"
left_pad="0"
- max_length="10"
+ max_length_bytes="10"
name="redirectx"
width="50">
<line_editor.commit_callback
@@ -342,7 +342,7 @@
height="16"
layout="topleft"
left_pad="10"
- max_length="10"
+ max_length_bytes="10"
name="redirecty"
top_delta="0"
width="40">
@@ -754,7 +754,7 @@
height="22"
layout="topleft"
left_pad="10"
- max_length="63"
+ max_length_bytes="63"
name="parameter"
top_delta="0"
width="290" />
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
index 2ef52bf539..29f09dd0b2 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
@@ -58,7 +58,7 @@
height="16"
layout="topleft"
left_delta="78"
- max_length="63"
+ max_length_bytes="63"
name="LabelItemName"
top_delta="0"
width="252" />
@@ -81,7 +81,7 @@
height="16"
layout="topleft"
left_delta="78"
- max_length="127"
+ max_length_bytes="127"
name="LabelItemDesc"
top_delta="0"
width="252" />
@@ -348,7 +348,7 @@
height="16"
layout="topleft"
left_pad="5"
- max_length="25"
+ max_length_bytes="25"
name="EditPrice"
top_delta="0"
width="242" /-->
diff --git a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml
index 1d73d516d0..068737494f 100644
--- a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml
+++ b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml
@@ -50,7 +50,7 @@ as a new Outfit:
left_delta="0"
show_text_as_tentative="false"
top_pad="0"
- max_length="63"
+ max_length_bytes="63"
name="name ed"
width="200">
[DESC] (new)
diff --git a/indra/newview/skins/default/xui/en/floater_pay.xml b/indra/newview/skins/default/xui/en/floater_pay.xml
index 7ab565313e..41a7134b1d 100644
--- a/indra/newview/skins/default/xui/en/floater_pay.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay.xml
@@ -84,7 +84,7 @@
top_pad="0"
layout="topleft"
left="130"
- max_length="9"
+ max_length_bytes="9"
name="amount"
width="80" />
<button
diff --git a/indra/newview/skins/default/xui/en/floater_pay_object.xml b/indra/newview/skins/default/xui/en/floater_pay_object.xml
index d8cfed7b09..d3a35c2051 100644
--- a/indra/newview/skins/default/xui/en/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay_object.xml
@@ -117,7 +117,7 @@
top_pad="0"
layout="topleft"
left="120"
- max_length="9"
+ max_length_bytes="9"
name="amount"
width="80" />
<button
diff --git a/indra/newview/skins/default/xui/en/floater_post_process.xml b/indra/newview/skins/default/xui/en/floater_post_process.xml
index 05559adf89..05943a10d3 100644
--- a/indra/newview/skins/default/xui/en/floater_post_process.xml
+++ b/indra/newview/skins/default/xui/en/floater_post_process.xml
@@ -416,7 +416,7 @@
label="Effect Name"
layout="topleft"
left_delta="0"
- max_length="40"
+ max_length_bytes="40"
name="PPEffectNameEditor"
tab_group="1"
top_pad="22"
diff --git a/indra/newview/skins/default/xui/en/floater_postcard.xml b/indra/newview/skins/default/xui/en/floater_postcard.xml
index 6f78363b25..b4ecedd981 100644
--- a/indra/newview/skins/default/xui/en/floater_postcard.xml
+++ b/indra/newview/skins/default/xui/en/floater_postcard.xml
@@ -78,7 +78,7 @@
height="20"
layout="topleft"
left_delta="108"
- max_length="100"
+ max_length_bytes="100"
name="name_form"
top_delta="-4"
width="150" />
@@ -99,7 +99,7 @@
label="Type your subject here."
layout="topleft"
left_delta="108"
- max_length="100"
+ max_length_bytes="100"
name="subject_form"
top_delta="-4"
width="150" />
diff --git a/indra/newview/skins/default/xui/en/floater_preview_animation.xml b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
index 6dc073728b..65efc46c71 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
@@ -32,7 +32,7 @@
height="19"
layout="topleft"
left_delta="95"
- max_length="127"
+ max_length_bytes="127"
name="desc"
top="19"
width="170" />
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index 1903401988..a17cf8eea8 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -80,7 +80,7 @@
height="20"
layout="topleft"
left_delta="89"
- max_length="31"
+ max_length_bytes="31"
name="trigger_editor"
top_delta="-4"
width="175" />
@@ -104,7 +104,7 @@
height="20"
layout="topleft"
left_delta="99"
- max_length="31"
+ max_length_bytes="31"
name="replace_editor"
tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture"
top_delta="-4"
@@ -263,7 +263,7 @@
height="20"
layout="topleft"
left_delta="0"
- max_length="127"
+ max_length_bytes="127"
name="chat_editor"
top="330"
width="100" />
@@ -316,7 +316,7 @@
height="20"
layout="topleft"
left_pad="10"
- max_length="15"
+ max_length_bytes="15"
name="wait_time_editor"
top_delta="1"
width="50" />
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index e5a5fab9b9..8c9e1d52b3 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -56,7 +56,7 @@
height="22"
layout="topleft"
left_pad="0"
- max_length="127"
+ max_length_bytes="127"
name="desc"
width="296" />
<text_editor
diff --git a/indra/newview/skins/default/xui/en/floater_preview_sound.xml b/indra/newview/skins/default/xui/en/floater_preview_sound.xml
index f3be8c4131..62ef4c3097 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_sound.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_sound.xml
@@ -32,7 +32,7 @@
height="19"
layout="topleft"
left_pad="0"
- max_length="127"
+ max_length_bytes="127"
name="desc"
width="170" />
<button
diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
index 7fd7eab867..a79d2f63cb 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
@@ -40,7 +40,7 @@
height="19"
layout="topleft"
left_pad="0"
- max_length="127"
+ max_length_bytes="127"
name="desc"
width="190" />
<text
diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml
index 47383c8010..e6d749a3f0 100644
--- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml
@@ -416,7 +416,7 @@
height="23"
layout="topleft"
left="10"
- max_length="256"
+ max_length_bytes="256"
name="abuse_location_edit"
top_pad="0"
width="313" />
@@ -441,7 +441,7 @@
height="23"
layout="topleft"
left_delta="0"
- max_length="64"
+ max_length_bytes="64"
name="summary_edit"
top_pad="0"
width="313" />
diff --git a/indra/newview/skins/default/xui/en/floater_script_preview.xml b/indra/newview/skins/default/xui/en/floater_script_preview.xml
index d0cd00d147..8c03b56040 100644
--- a/indra/newview/skins/default/xui/en/floater_script_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_preview.xml
@@ -55,7 +55,7 @@
height="19"
layout="topleft"
left_delta="80"
- max_length="127"
+ max_length_bytes="127"
name="desc"
top_delta="0"
width="394" />
diff --git a/indra/newview/skins/default/xui/en/floater_sound_preview.xml b/indra/newview/skins/default/xui/en/floater_sound_preview.xml
index ca54ee6604..af791466b6 100644
--- a/indra/newview/skins/default/xui/en/floater_sound_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_sound_preview.xml
@@ -27,7 +27,7 @@
height="19"
layout="topleft"
left_delta="0"
- max_length="63"
+ max_length_bytes="63"
name="name_form"
top_pad="0"
width="280" />
@@ -51,7 +51,7 @@
height="19"
layout="topleft"
left_delta="0"
- max_length="127"
+ max_length_bytes="127"
name="description_form"
top_pad="0"
width="280" />
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 4c508035be..d5be64192b 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -831,7 +831,7 @@
follows="left|top|right"
height="19"
left_pad="0"
- max_length="63"
+ max_length_bytes="63"
name="Object Name"
select_on_focus="true"
top_delta="0"
@@ -849,7 +849,7 @@
follows="left|top|right"
height="19"
left_pad="0"
- max_length="127"
+ max_length_bytes="127"
name="Object Description"
select_on_focus="true"
top_delta="0"
@@ -2554,7 +2554,7 @@ even though the user gets a free copy.
height="16"
layout="topleft"
left="10"
- max_length="63"
+ max_length_bytes="63"
name="Home Url"
select_on_focus="true"
top="134"
diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
index 3b10a57c50..12c4561753 100644
--- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
@@ -241,7 +241,7 @@
height="20"
layout="topleft"
left_delta="100"
- max_length="300"
+ max_length_bytes="300"
name="executable_path_field"
select_on_focus="true"
tool_tip="The full path to an editor (executable) to edit floater XML files (quotes not necessary)"
@@ -280,7 +280,7 @@
height="20"
layout="topleft"
left_delta="100"
- max_length="300"
+ max_length_bytes="300"
name="executable_args_field"
select_on_focus="true"
tool_tip="Command-line arguments to the editor; use &apos;%FILE%&apos; to refer to the target file; &apos;YourProgram.exe FileName.xml&apos; will be run if this field is empty"
@@ -321,7 +321,7 @@
height="20"
layout="topleft"
left_delta="65"
- max_length="300"
+ max_length_bytes="300"
name="vlt_diff_path_field"
select_on_focus="true"
tool_tip="The full path to an XML D0 or D1 localization difference file generated by the Viewer Localization Toolkit"
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 20629018e2..019e7cd032 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -541,7 +541,7 @@
halign="right"
height="16"
layout="topleft"
- left="25"
+ left="15"
name="events_label"
top_pad="16"
width="70">
@@ -574,7 +574,8 @@
left_delta="47"
max_val="255"
min_val="0"
- name="teleport_coordinate_y" >
+ name="teleport_coordinate_y"
+ width="44" >
<spinner.commit_callback
function="WMap.Coordinates" />
</spinner>
@@ -584,12 +585,13 @@
follows="right|bottom"
height="23"
increment="1"
- initial_value="128"
+ initial_value="23"
layout="topleft"
left_delta="47"
- max_val="255"
+ max_val="4096"
min_val="0"
- name="teleport_coordinate_z">
+ name="teleport_coordinate_z"
+ width="55" >
<spinner.commit_callback
function="WMap.Coordinates" />
</spinner>
diff --git a/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml b/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml
index 1925d3396f..5033ea9546 100644
--- a/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
layout="topleft"
name="Add Wearable Gear Menu">
<menu_item_check
@@ -38,4 +38,4 @@
function="AddWearable.Gear.Visible"
parameter="by_type" />
</menu_item_check>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
index c2a11a64ec..a6e9a40e31 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
layout="topleft"
name="Gear COF">
<menu
@@ -10,4 +10,4 @@
label="New Body Parts"
layout="topleft"
name="COF.Geear.New_Body_Parts" />
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
index 649f0edff7..b08d21e8f4 100644
--- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
layout="topleft"
mouse_opaque="false"
name="menu_gesture_gear"
@@ -62,4 +62,4 @@
function="Gesture.EnableAction"
parameter="edit_gesture" />
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
index 334decdf58..58d58a6ca9 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu
+<toggleable_menu
create_jump_keys="true"
layout="topleft"
mouse_opaque="false"
@@ -124,4 +124,4 @@
<menu_item_call.on_click
function="InspectAvatar.Share"/>
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml
index 76f68c6d4b..f818ebe2d7 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu
+<toggleable_menu
create_jump_keys="true"
layout="topleft"
mouse_opaque="false"
@@ -136,4 +136,4 @@
<menu_item_call.on_click
function="InspectObject.MoreInfo"/>
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
index 30c2cde552..50ad3f834e 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu
+<toggleable_menu
create_jump_keys="true"
layout="topleft"
mouse_opaque="false"
@@ -63,4 +63,4 @@
<menu_item_call.on_visible
function="IsGodCustomerService"/>
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
index c394700081..679d5bc82e 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
bottom="806"
layout="topleft"
left="0"
@@ -125,4 +125,4 @@
function="Inventory.GearDefault.Custom.Action"
parameter="empty_trash" />
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index 732b8a788d..5fc25b8f0f 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
layout="topleft"
visible="false"
name="Gear Outfit">
@@ -212,4 +212,4 @@
function="Gear.OnVisible"
parameter="delete" />
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml
index 22796f7b68..29eeb93ac1 100644
--- a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="menu_group_plus"
+<toggleable_menu
+ name="menu_group_plus"
left="0" bottom="0" visible="false"
mouse_opaque="false">
<menu_item_check
@@ -43,4 +44,4 @@
<menu_item_call name="show_blocked_list" label="Show Blocked Residents &amp; Objects">
<menu_item_call.on_click function="SideTray.ShowPanel" parameter="panel_block_list_sidetray" />
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
index 2efb204ffb..c710fe3b9b 100644
--- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="menu_group_plus"
+<toggleable_menu
+ name="menu_group_plus"
left="0" bottom="0" visible="false"
mouse_opaque="false">
<menu_item_check
@@ -22,4 +23,4 @@
<menu_item_call.on_enable
function="People.Group.Minus.Enable"/>
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
index 69b3831738..f9db64b524 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="menu_group_plus"
+<toggleable_menu
+ name="menu_group_plus"
left="0" bottom="0" visible="false"
mouse_opaque="false">
<menu_item_check
@@ -45,4 +46,4 @@
<menu_item_call name="show_blocked_list" label="Show Blocked Residents &amp; Objects">
<menu_item_call.on_click function="SideTray.ShowPanel" userdata="panel_block_list_sidetray" />
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml
index 5c9555db92..0634e3bd3b 100644
--- a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="menu_group_plus"
+<toggleable_menu
+ name="menu_group_plus"
left="0" bottom="0" visible="false"
mouse_opaque="false">
<menu_item_check
@@ -35,4 +36,4 @@
<menu_item_call name="show_blocked_list" label="Show Blocked Residents &amp; Objects">
<menu_item_call.on_click function="SideTray.ShowPanel" userdata="panel_block_list_sidetray" />
</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 77cc3910fd..6f46165883 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
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
bottom="806"
layout="topleft"
left="0"
@@ -145,4 +145,4 @@
function="Places.LandmarksGear.Folding.Action"
parameter="sort_by_date" />
</menu_item_check>
-</menu>
+</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 4b8bc8132f..121e7cc07a 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
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
bottom="806"
layout="topleft"
left="0"
@@ -174,4 +174,4 @@
function="Places.LandmarksGear.Enable"
parameter="create_pick" />
</menu_item_call>
-</menu>
+</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 134b331514..bc7d4fe33b 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
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
name="Teleport History Gear Context Menu"
left="0"
bottom="0"
@@ -33,4 +33,4 @@
<menu_item_call.on_click
function="TeleportHistory.ClearTeleportHistory" />
</menu_item_call>
-</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 ce628d93b5..43058a5ee3 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2761,18 +2761,6 @@
function="Floater.Show"
parameter="font_test" />
</menu_item_call>
- <menu_item_call
- label="Load from XML"
- name="Load from XML">
- <menu_item_call.on_click
- function="Advanced.LoadUIFromXML" />
- </menu_item_call>
- <menu_item_call
- label="Save to XML"
- name="Save to XML">
- <menu_item_call.on_click
- function="Advanced.SaveUIToXML" />
- </menu_item_call>
<menu_item_check
label="Show XUI Names"
name="Show XUI Names">
diff --git a/indra/newview/skins/default/xui/en/menu_wearing_gear.xml b/indra/newview/skins/default/xui/en/menu_wearing_gear.xml
index 84ab16c709..0ac2c14253 100644
--- a/indra/newview/skins/default/xui/en/menu_wearing_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_wearing_gear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
layout="topleft"
visible="false"
name="Gear Wearing">
@@ -20,4 +20,4 @@
function="Gear.OnEnable"
parameter="take_off" />
</menu_item_call>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 83cbcb3344..4ee04b44b6 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1367,6 +1367,14 @@ Could not find &apos;data&apos; chunk in WAV header:
<notification
icon="alertmodal.tga"
+ name="SoundFileInvalidChunkSize"
+ type="alertmodal">
+Wrong chunk size in WAV file:
+[FILE]
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="SoundFileInvalidTooLong"
type="alertmodal">
Audio file is too long (10 second maximum):
diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
index 5934956559..ce0438fbc9 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
@@ -119,7 +119,7 @@
layout="topleft"
left="10"
top_pad="2"
- max_length="30"
+ max_length_bytes="30"
name="classified_name"
prevalidate_callback="ascii"
text_color="black"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
index a490f27b9f..8c0c543d71 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
index 929cdffb3d..8e8d8e6505 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Upper Fabric"
+ label="Upper Texture"
layout="topleft"
left="25"
name="Upper Fabric"
@@ -41,7 +41,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Lower Fabric"
+ label="Lower Texture"
layout="topleft"
left_pad="20"
name="Lower Fabric"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
index f22cf983aa..dd749a9259 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
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 c4b831b71c..a284d3ccc0 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
@@ -104,7 +104,7 @@
layout="topleft"
left="10"
top_pad="2"
- max_length="63"
+ max_length_bytes="63"
name="pick_name"
text_color="black"
width="273" />
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
index 85823073b5..5424b805e1 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
index b26fde68f1..859e7454a4 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
index bb8e0dca07..76d66cc5dc 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
index d813d94d93..5f978174b3 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
index 19225e9757..16f28377fb 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
index 720a55dcc2..059485cfb4 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
@@ -26,7 +26,7 @@
default_image_name="Default"
follows="left|top"
height="80"
- label="Fabric"
+ label="Texture"
layout="topleft"
left="10"
name="Fabric"
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 b8ef612c6c..b3e9586ee9 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -241,7 +241,7 @@
height="23"
layout="topleft"
left="10"
- max_length="63"
+ max_length_bytes="63"
name="description"
prevalidate_callback="ascii"
select_on_focus="true"
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 3ded5c6678..0347d2feec 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -71,7 +71,7 @@ background_visible="true"
label="Type your new group name here"
layout="topleft"
left_delta="10"
- max_length="35"
+ max_length_bytes="35"
name="group_name_editor"
top_delta="5"
width="270"
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index 2e57c85d6f..1270a21710 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -184,7 +184,7 @@
height="19"
layout="topleft"
left_pad="5"
- max_length="10"
+ max_length_bytes="10"
name="your_contribution_line_editor"
top_delta="0"
width="80" />
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 41f2b28004..600b0e3b71 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -138,7 +138,7 @@ Maximum 200 per group daily
height="16"
layout="topleft"
left_pad="3"
- max_length="63"
+ max_length_bytes="63"
name="create_subject"
prevalidate_callback="ascii"
width="220" />
@@ -180,7 +180,7 @@ Maximum 200 per group daily
enabled="false"
height="19"
layout="topleft"
- max_length="90"
+ max_length_bytes="90"
mouse_opaque="false"
name="create_inventory_name"
top_pad="2"
@@ -307,7 +307,7 @@ Maximum 200 per group daily
height="20"
layout="topleft"
left_pad="3"
- max_length="63"
+ max_length_bytes="63"
name="view_subject"
top_delta="-1"
visible="false"
@@ -341,7 +341,7 @@ Maximum 200 per group daily
height="20"
layout="topleft"
left="5"
- max_length="63"
+ max_length_bytes="63"
mouse_opaque="false"
name="view_inventory_name"
top_pad="8"
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index 074e9bf5e5..a7178dc288 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -390,7 +390,7 @@ things in this group. There&apos;s a broad variety of Abilities.
left="0"
follows="left|top|right"
right="-1"
- max_length="20"
+ max_length_bytes="20"
name="role_name"
top_pad="0"
width="300">
@@ -413,7 +413,7 @@ things in this group. There&apos;s a broad variety of Abilities.
left="0"
follows="left|top|right"
right="-1"
- max_length="20"
+ max_length_bytes="20"
name="role_title"
top_pad="0"
width="300">
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 f8635b9edb..6ee2abc70f 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -252,7 +252,7 @@
height="22"
layout="topleft"
left="0"
- max_length="63"
+ max_length_bytes="63"
name="title_editor"
prevalidate_callback="ascii"
text_readonly_color="white"
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index a5d730711c..b181ca3bba 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -69,7 +69,7 @@ follows="left|bottom"
height="22"
label="bobsmith12 or Steller Sunshine"
left_delta="0"
-max_length="63"
+max_length_bytes="63"
name="username_edit"
prevalidate_callback="ascii"
select_on_focus="true"
@@ -89,7 +89,7 @@ top="20"
<line_editor
follows="left|bottom"
height="22"
- max_length="16"
+ max_length_bytes="16"
name="password_edit"
select_on_focus="true"
top_pad="0"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 55df70eb71..5871eb0654 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -17,7 +17,7 @@
layout="topleft"
left_delta="3"
left="0"
- max_length="1024"
+ max_length_bytes="1023"
name="chat_box"
text_pad_left="5"
text_pad_right="25"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 7d9bd1bf2a..9d496575c9 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -280,7 +280,7 @@ Automatic position for:
enabled_control="EnableVoiceChat"
height="23"
left="80"
- max_length="200"
+ max_length_bytes="200"
name="modifier_combo"
label="Push-to-Speak trigger"
top_pad="5"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 31e160ec33..c009fd2931 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -308,6 +308,38 @@
width="95">
URLs
</text>
+ <spinner
+ control_name="NearbyToastLifeTime"
+ decimal_digits="0"
+ follows="left|top"
+ height="23"
+ increment="1"
+ initial_value="23"
+ label="Nearby chat toasts life time:"
+ label_width="190"
+ layout="topleft"
+ left="290"
+ max_val="60"
+ min_val="1"
+ name="nearby_toasts_lifetime"
+ top_pad="33"
+ width="210" />
+ <spinner
+ control_name="NearbyToastFadingTime"
+ decimal_digits="0"
+ follows="left|top"
+ height="23"
+ increment="1"
+ initial_value="3"
+ label="Nearby chat toasts fading time:"
+ label_width="190"
+ layout="topleft"
+ left_delta="00"
+ max_val="60"
+ min_val="0"
+ name="nearby_toasts_fadingtime"
+ top_pad="15"
+ width="210" />
<check_box
control_name="PlayTypingAnim"
height="16"
@@ -316,7 +348,7 @@
layout="topleft"
left="30"
name="play_typing_animation"
- top_pad="32"
+ top="205"
width="400" />
<check_box
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index b25fd695c9..273c252474 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -319,7 +319,7 @@
min_width="90">
<line_editor
name="media_address_url"
- max_length="1024"
+ max_length_bytes="1023"
follows="top|left|right"
height="22"
top="0"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index 8760c911dc..6940d1549b 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -118,7 +118,7 @@
height="20"
layout="topleft"
left_delta="78"
- max_length="63"
+ max_length_bytes="63"
name="LabelItemName"
top_delta="0"
width="210" />
@@ -141,7 +141,7 @@
height="23"
layout="topleft"
left_delta="78"
- max_length="127"
+ max_length_bytes="127"
name="LabelItemDesc"
top_delta="-5"
width="210" />
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index a2f7edb167..ca63d2df39 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -118,7 +118,7 @@
height="20"
layout="topleft"
left_delta="78"
- max_length="63"
+ max_length_bytes="63"
name="Object Name"
top_delta="0"
width="225" />
@@ -143,7 +143,7 @@
name="Object Description"
select_on_focus="true"
left_delta="78"
- max_length="127"
+ max_length_bytes="127"
top_delta="-5"
width="225"/>
<text
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index bee0e4fde6..5d3f19edcf 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -338,7 +338,7 @@
<string name="avi_movie_file">AVI Movie File</string>
<string name="xaf_animation_file">XAF Anim File</string>
<string name="xml_file">XML File</string>
- <string name="dot_raw_file">RAW File</string>
+ <string name="raw_file">RAW File</string>
<string name="compressed_image_files">Compressed Images</string>
<string name="load_files">Load Files</string>
<string name="choose_the_directory">Choose Directory</string>
@@ -2242,8 +2242,7 @@ Clears (deletes) the media and all params from the given face.
<string name="InvOfferOwnedBy">owned by</string>
<string name="InvOfferOwnedByUnknownUser">owned by an unknown user</string>
<string name="InvOfferGaveYou">gave you</string>
- <string name="InvOfferYouDecline">You decline</string>
- <string name="InvOfferFrom">from</string>
+ <string name="InvOfferDecline">You decline [DESC] from &lt;nolink&gt;[NAME]&lt;/nolink&gt;.</string>
<!-- group money -->
<string name="GroupMoneyTotal">Total</string>
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index ac12b700ee..5fa3d54de2 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -777,7 +777,7 @@
<string name="xml_file">
Archivo XML
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
Archivo RAW
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index a7a766f6a6..af70048106 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -798,7 +798,7 @@
<string name="xml_file">
Fichier XML
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
Fichier RAW
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index 4fc0d19199..9dbfc2b79c 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -783,7 +783,7 @@
<string name="xml_file">
File XML
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
File RAW
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index 072ae6c630..92bbedaee5 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -798,7 +798,7 @@
<string name="xml_file">
XML ファイル
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
RAW ファイル
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/nl/notifications.xml b/indra/newview/skins/default/xui/nl/notifications.xml
index a282c70364..b4b56a035f 100644
--- a/indra/newview/skins/default/xui/nl/notifications.xml
+++ b/indra/newview/skins/default/xui/nl/notifications.xml
@@ -2409,10 +2409,10 @@ Wilt u de [SECOND_LIFE] website bezoeken om dit in te stellen?
Onderwerp: [SUBJECT], Bericht: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [FIRST] [LAST] is Online
+ [NAME] is Online
</notification>
<notification name="FriendOffline">
- [FIRST] [LAST] is Offline
+ [NAME] is Offline
</notification>
<notification name="AddSelfFriend">
U kunt uzelf niet als vriend toevoegen.
@@ -2574,7 +2574,7 @@ Indien u streaming media wilt zien op percelen die dit ondersteunen, dient u naa
De objecten die uw eigendom zijn op het geselecteerde perceel zijn geretourneerd naar uw inventaris.
</notification>
<notification name="OtherObjectsReturned">
- De objecten op het geselecteerde perceel dat het eigendom is van [FIRST] [LAST], zijn geretourneerd naar zijn of haar inventaris.
+ De objecten op het geselecteerde perceel dat het eigendom is van [NAME], zijn geretourneerd naar zijn of haar inventaris.
</notification>
<notification name="OtherObjectsReturned2">
De objecten op het geselecteerde perceel dat het eigendom is van inwoner &apos;[NAME]&apos;, zijn geretourneerd naar hun eigenaar.
@@ -2701,7 +2701,7 @@ Probeer het alstublieft opnieuw over enkele ogenblikken.
Geen geldig perceel kon gevonden worden.
</notification>
<notification name="ObjectGiveItem">
- Een object genaamd [OBJECTFROMNAME], eigendom van [FIRST] [LAST], heeft u een [OBJECTTYPE] genaamd [OBJECTNAME] gegeven.
+ Een object genaamd &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt;, eigendom van [NAME_SLURL], heeft u een [OBJECTTYPE] genaamd [ITEM_SLURL] gegeven.
<form name="form">
<button name="Keep" text="Behouden"/>
<button name="Discard" text="Afwijzen"/>
@@ -2840,7 +2840,7 @@ Dit verzoek inwilligen?
</form>
</notification>
<notification name="ScriptDialog">
- [FIRST] [LAST]&apos;s &apos;[TITLE]&apos;
+ [NAME]&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
[MESSAGE]
<form name="form">
<button name="Ignore" text="Negeren"/>
@@ -2941,13 +2941,13 @@ Klik Accepteren om deel te nemen aan dit gesprek of Afwijzen om de uitnodiging a
</form>
</notification>
<notification name="AutoUnmuteByIM">
- Er is een instant message naar [FIRST] [LAST] gestuurd, waardoor deze automatisch van de negeerlijst is gehaald.
+ Er is een instant message naar [NAME] gestuurd, waardoor deze automatisch van de negeerlijst is gehaald.
</notification>
<notification name="AutoUnmuteByMoney">
- Er is geld gegeven aan [FIRST] [LAST], waardoor deze automatisch van de negeerlijst is gehaald.
+ Er is geld gegeven aan [NAME], waardoor deze automatisch van de negeerlijst is gehaald.
</notification>
<notification name="AutoUnmuteByInventory">
- Er is inventaris aangeboden aan [FIRST] [LAST], waardoor deze automatisch van de negeerlijst is gehaald.
+ Er is inventaris aangeboden aan [NAME], waardoor deze automatisch van de negeerlijst is gehaald.
</notification>
<notification name="VoiceInviteGroup">
[NAME] doet nu mee met een Voice chat gesprek binnen de groep [GROUP].
diff --git a/indra/newview/skins/default/xui/nl/strings.xml b/indra/newview/skins/default/xui/nl/strings.xml
index 1ee26c3f24..844945913f 100644
--- a/indra/newview/skins/default/xui/nl/strings.xml
+++ b/indra/newview/skins/default/xui/nl/strings.xml
@@ -665,7 +665,7 @@
<string name="xml_file">
XML bestand
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
RAW bestand
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml
index c9fe22f3c8..e355bdbb96 100644
--- a/indra/newview/skins/default/xui/pl/strings.xml
+++ b/indra/newview/skins/default/xui/pl/strings.xml
@@ -774,7 +774,7 @@
<string name="xml_file">
Plik XML
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
Plik RAW
</string>
<string name="compressed_image_files">
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index 2247b0a76b..800ad479fc 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -777,7 +777,7 @@
<string name="xml_file">
Arquivo XML
</string>
- <string name="dot_raw_file">
+ <string name="raw_file">
Arquivo RAW
</string>
<string name="compressed_image_files">