summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml194
-rwxr-xr-xdoc/contributions.txt1
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp32
-rw-r--r--indra/llcommon/threadpool.cpp5
-rw-r--r--indra/llcommon/threadpool.h4
-rw-r--r--indra/llprimitive/llmaterial.cpp18
-rw-r--r--indra/llprimitive/llmaterial.h2
-rw-r--r--indra/llrender/llfontgl.cpp24
-rw-r--r--indra/llrender/llfontgl.h2
-rw-r--r--indra/llrender/llimagegl.cpp9
-rw-r--r--indra/llui/llfolderviewitem.cpp2
-rw-r--r--indra/llui/lliconctrl.cpp26
-rw-r--r--indra/llui/lliconctrl.h3
-rw-r--r--indra/llui/llpanel.h1
-rw-r--r--indra/llui/lltextbase.cpp10
-rw-r--r--indra/llui/lltextbase.h2
-rw-r--r--indra/llui/lluicolortable.cpp6
-rw-r--r--indra/llui/llview.h1
-rw-r--r--indra/llwindow/llwindow.h3
-rw-r--r--indra/llwindow/llwindowwin32.cpp3
-rw-r--r--indra/newview/app_settings/settings.xml17
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h1
-rw-r--r--indra/newview/lldrawpoolalpha.cpp2
-rw-r--r--indra/newview/llfilepicker.cpp34
-rw-r--r--indra/newview/llfilepicker.h6
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp2
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp6
-rw-r--r--indra/newview/llfloaterimsessiontab.h1
-rw-r--r--indra/newview/llfloaterregioninfo.cpp14
-rw-r--r--indra/newview/llfloaterregioninfo.h1
-rw-r--r--indra/newview/llfloatertranslationsettings.cpp142
-rw-r--r--indra/newview/llfloatertranslationsettings.h24
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp44
-rw-r--r--indra/newview/llinventorypanel.cpp6
-rw-r--r--indra/newview/llpanelface.cpp131
-rw-r--r--indra/newview/llpanelface.h15
-rw-r--r--indra/newview/llpanelobjectinventory.cpp3
-rw-r--r--indra/newview/llpanelprofile.cpp60
-rw-r--r--indra/newview/llpanelprofilepicks.cpp1
-rw-r--r--indra/newview/llpanelwearing.cpp2
-rw-r--r--indra/newview/llscripteditor.cpp2
-rw-r--r--indra/newview/llstartup.cpp13
-rw-r--r--indra/newview/lltranslate.cpp556
-rw-r--r--indra/newview/lltranslate.h16
-rw-r--r--indra/newview/llviewermenu.cpp4
-rw-r--r--indra/newview/llviewermenufile.cpp7
-rw-r--r--indra/newview/llviewertexture.cpp3
-rw-r--r--indra/newview/llviewertexturelist.cpp2
-rw-r--r--indra/newview/llvoicevivox.cpp48
-rw-r--r--indra/newview/llvoicevivox.h7
-rw-r--r--indra/newview/llvovolume.cpp28
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_beta.pngbin0 -> 3223 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.pngbin0 -> 3221 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_lifetime.pngbin0 -> 3302 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_linden.pngbin0 -> 3521 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.pngbin0 -> 3311 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.pngbin0 -> 3301 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_translation_settings.xml125
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_secondlife.xml56
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_hair.xml2
61 files changed, 1183 insertions, 554 deletions
diff --git a/autobuild.xml b/autobuild.xml
index d09d862f1b..fe5d10c613 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" ?>
-<llsd>
-<map>
+<llsd><map>
<key>installables</key>
<map>
<key>SDL</key>
@@ -184,9 +183,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>7b4aceaed511d44c4d1354b2162b59c7</string>
+ <string>02b569ac2bd71f201e3dd86ade7b3eeb</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107398/936936/bugsplat-1.0.7.576560-darwin64-576560.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113876/983684/bugsplat-1.0.7.579696-darwin64-579696.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -196,9 +195,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>53918c7c74b943cdc0bb90caf9657a84</string>
+ <string>5b32c47ae8e8cf0d4106f08e8db18044</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107400/936949/bugsplat-4.0.3.0.576560-windows-576560.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113878/983697/bugsplat-4.0.3.0.579696-windows-579696.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -208,16 +207,16 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>19d6a55db101f02e7eb531daf3e8cfd1</string>
+ <string>79c005fd8a660f8551b3c9ede64fa4ef</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/107401/936948/bugsplat-.576560-windows64-576560.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113879/983696/bugsplat-4.0.3.0.579696-windows64-579696.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
- <string>4.0.3.0.576560</string>
+ <string>4.0.3.0.579696</string>
</map>
<key>colladadom</key>
<map>
@@ -307,31 +306,29 @@
<key>name</key>
<string>darwin64</string>
</map>
- <key>windows</key>
+ <key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>b5ea7097ae10037024b0c2b3df9812b5</string>
+ <string>ac54672e0b38f52726f5c99047c913e4</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89307/815434/cubemaptoequirectangular-1.1.0-windows-564841.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89306/815431/cubemaptoequirectangular-1.1.0-windows64-564841.tar.bz2</string>
</map>
- <key>name</key>
- <string>windows</string>
</map>
- <key>windows64</key>
+ <key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>ac54672e0b38f52726f5c99047c913e4</string>
+ <string>b5ea7097ae10037024b0c2b3df9812b5</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89306/815431/cubemaptoequirectangular-1.1.0-windows64-564841.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89307/815434/cubemaptoequirectangular-1.1.0-windows-564841.tar.bz2</string>
</map>
<key>name</key>
- <string>windows64</string>
+ <string>windows</string>
</map>
- <key>linux64</key>
+ <key>windows64</key>
<map>
<key>archive</key>
<map>
@@ -340,6 +337,8 @@
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89306/815431/cubemaptoequirectangular-1.1.0-windows64-564841.tar.bz2</string>
</map>
+ <key>name</key>
+ <string>windows64</string>
</map>
</map>
<key>version</key>
@@ -1063,31 +1062,29 @@
<key>name</key>
<string>darwin64</string>
</map>
- <key>windows</key>
+ <key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>0a376676dbb43fdd0c81ffdfbc5e6f81</string>
+ <string>e70898903475d8ac2e81ff33278fc987</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89308/815432/jpegencoderbasic-1.0-windows-564842.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89309/815433/jpegencoderbasic-1.0-windows64-564842.tar.bz2</string>
</map>
- <key>name</key>
- <string>windows</string>
</map>
- <key>windows64</key>
+ <key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>e70898903475d8ac2e81ff33278fc987</string>
+ <string>0a376676dbb43fdd0c81ffdfbc5e6f81</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89309/815433/jpegencoderbasic-1.0-windows64-564842.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89308/815432/jpegencoderbasic-1.0-windows-564842.tar.bz2</string>
</map>
<key>name</key>
- <string>windows64</string>
+ <string>windows</string>
</map>
- <key>linux64</key>
+ <key>windows64</key>
<map>
<key>archive</key>
<map>
@@ -1096,6 +1093,8 @@
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89309/815433/jpegencoderbasic-1.0-windows64-564842.tar.bz2</string>
</map>
+ <key>name</key>
+ <string>windows64</string>
</map>
</map>
<key>version</key>
@@ -2484,31 +2483,29 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>name</key>
<string>darwin64</string>
</map>
- <key>windows</key>
+ <key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>e1303fb9f2242a79aee5fd9f97726ace</string>
+ <string>46edf0f55417f8ef0d33a5c007bc3644</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89311/815452/threejs-0.132.2-windows-564843.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89310/815451/threejs-0.132.2-windows64-564843.tar.bz2</string>
</map>
- <key>name</key>
- <string>windows</string>
</map>
- <key>windows64</key>
+ <key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>46edf0f55417f8ef0d33a5c007bc3644</string>
+ <string>e1303fb9f2242a79aee5fd9f97726ace</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89310/815451/threejs-0.132.2-windows64-564843.tar.bz2</string>
+ <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89311/815452/threejs-0.132.2-windows-564843.tar.bz2</string>
</map>
<key>name</key>
- <string>windows64</string>
+ <string>windows</string>
</map>
- <key>linux64</key>
+ <key>windows64</key>
<map>
<key>archive</key>
<map>
@@ -2517,6 +2514,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89310/815451/threejs-0.132.2-windows64-564843.tar.bz2</string>
</map>
+ <key>name</key>
+ <string>windows64</string>
</map>
</map>
<key>version</key>
@@ -3021,18 +3020,25 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>name</key>
<string>common</string>
</map>
- <key>linux64</key>
+ <key>darwin64</key>
<map>
<key>build_directory</key>
- <string>build-linux-x86_64</string>
+ <string>build-darwin-x86_64</string>
<key>configurations</key>
<map>
- <key>Release</key>
+ <key>RelWithDebInfo</key>
<map>
<key>build</key>
<map>
<key>command</key>
- <string>ninja</string>
+ <string>xcodebuild</string>
+ <key>options</key>
+ <array>
+ <string>-configuration</string>
+ <string>RelWithDebInfo</string>
+ <string>-project</string>
+ <string>SecondLife.xcodeproj</string>
+ </array>
</map>
<key>configure</key>
<map>
@@ -3043,53 +3049,40 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>options</key>
<array>
<string>-G</string>
- <string>Ninja</string>
- <string>-DLL_TESTS=Off</string>
+ <string>Xcode</string>
</array>
</map>
<key>default</key>
<string>True</string>
<key>name</key>
- <string>Release</string>
+ <string>RelWithDebInfo</string>
</map>
- <key>ReleaseOS</key>
+ <key>RelWithDebInfoOS</key>
<map>
<key>build</key>
<map>
<key>command</key>
- <string>ninja</string>
+ <string>xcodebuild</string>
+ <key>options</key>
+ <array>
+ <string>-configuration</string>
+ <string>RelWithDebInfo</string>
+ <string>-project</string>
+ <string>SecondLife.xcodeproj</string>
+ </array>
</map>
<key>configure</key>
<map>
<key>options</key>
<array>
<string>-G</string>
- <string>Ninja</string>
- <string>-DLL_TESTS=Off</string>
+ <string>Xcode</string>
</array>
</map>
<key>name</key>
- <string>ReleaseOS</string>
- </map>
- <key>default</key>
- <map>
- <key>build</key>
- <map>
- </map>
- <key>name</key>
- <string>default</string>
+ <string>RelWithDebInfoOS</string>
</map>
- </map>
- <key>name</key>
- <string>linux64</string>
- </map>
- <key>darwin64</key>
- <map>
- <key>build_directory</key>
- <string>build-darwin-x86_64</string>
- <key>configurations</key>
- <map>
- <key>RelWithDebInfo</key>
+ <key>Release</key>
<map>
<key>build</key>
<map>
@@ -3098,7 +3091,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>options</key>
<array>
<string>-configuration</string>
- <string>RelWithDebInfo</string>
+ <string>Release</string>
<string>-project</string>
<string>SecondLife.xcodeproj</string>
</array>
@@ -3115,12 +3108,10 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>Xcode</string>
</array>
</map>
- <key>default</key>
- <string>True</string>
<key>name</key>
- <string>RelWithDebInfo</string>
+ <string>Release</string>
</map>
- <key>RelWithDebInfoOS</key>
+ <key>ReleaseOS</key>
<map>
<key>build</key>
<map>
@@ -3129,7 +3120,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>options</key>
<array>
<string>-configuration</string>
- <string>RelWithDebInfo</string>
+ <string>Release</string>
<string>-project</string>
<string>SecondLife.xcodeproj</string>
</array>
@@ -3143,21 +3134,24 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
</array>
</map>
<key>name</key>
- <string>RelWithDebInfoOS</string>
+ <string>ReleaseOS</string>
</map>
+ </map>
+ <key>name</key>
+ <string>darwin64</string>
+ </map>
+ <key>linux64</key>
+ <map>
+ <key>build_directory</key>
+ <string>build-linux-x86_64</string>
+ <key>configurations</key>
+ <map>
<key>Release</key>
<map>
<key>build</key>
<map>
<key>command</key>
- <string>xcodebuild</string>
- <key>options</key>
- <array>
- <string>-configuration</string>
- <string>Release</string>
- <string>-project</string>
- <string>SecondLife.xcodeproj</string>
- </array>
+ <string>ninja</string>
</map>
<key>configure</key>
<map>
@@ -3168,9 +3162,12 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>options</key>
<array>
<string>-G</string>
- <string>Xcode</string>
+ <string>Ninja</string>
+ <string>-DLL_TESTS=Off</string>
</array>
</map>
+ <key>default</key>
+ <string>True</string>
<key>name</key>
<string>Release</string>
</map>
@@ -3179,29 +3176,31 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>build</key>
<map>
<key>command</key>
- <string>xcodebuild</string>
- <key>options</key>
- <array>
- <string>-configuration</string>
- <string>Release</string>
- <string>-project</string>
- <string>SecondLife.xcodeproj</string>
- </array>
+ <string>ninja</string>
</map>
<key>configure</key>
<map>
<key>options</key>
<array>
<string>-G</string>
- <string>Xcode</string>
+ <string>Ninja</string>
+ <string>-DLL_TESTS=Off</string>
</array>
</map>
<key>name</key>
<string>ReleaseOS</string>
</map>
+ <key>default</key>
+ <map>
+ <key>build</key>
+ <map>
+ </map>
+ <key>name</key>
+ <string>default</string>
+ </map>
</map>
<key>name</key>
- <string>darwin64</string>
+ <string>linux64</string>
</map>
<key>windows</key>
<map>
@@ -3372,5 +3371,4 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>autobuild</string>
<key>version</key>
<string>1.3</string>
- </map>
-</llsd>
+ </map></llsd>
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 02603f361d..61889a539d 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -1401,6 +1401,7 @@ Sovereign Engineer
SL-18497
SL-18525
SL-18534
+ SL-19336
SpacedOut Frye
VWR-34
VWR-45
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 403d5bcf49..6cc4295fc8 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1399,6 +1399,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
// get number of joint motions
//-------------------------------------------------------------------------
U32 num_motions = 0;
+ S32 rotation_dupplicates = 0;
+ S32 position_dupplicates = 0;
if (!dp.unpackU32(num_motions, "num_joints"))
{
LL_WARNS() << "can't read number of joints"
@@ -1629,6 +1631,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
rCurve->mKeys[time] = rot_key;
}
+ if (joint_motion->mRotationCurve.mNumKeys > joint_motion->mRotationCurve.mKeys.size())
+ {
+ rotation_dupplicates++;
+ LL_INFOS() << "Motion: " << asset_id << " had dupplicate rotation keys that were removed" << LL_ENDL;
+ }
+
//---------------------------------------------------------------------
// scan position curve header
//---------------------------------------------------------------------
@@ -1731,9 +1739,24 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
}
}
+ if (joint_motion->mPositionCurve.mNumKeys > joint_motion->mPositionCurve.mKeys.size())
+ {
+ position_dupplicates++;
+ }
+
joint_motion->mUsage = joint_state->getUsage();
}
+ if (rotation_dupplicates > 0)
+ {
+ LL_INFOS() << "Motion: " << asset_id << " had " << rotation_dupplicates << " dupplicate rotation keys that were removed" << LL_ENDL;
+ }
+
+ if (position_dupplicates > 0)
+ {
+ LL_INFOS() << "Motion: " << asset_id << " had " << position_dupplicates << " dupplicate position keys that were removed" << LL_ENDL;
+ }
+
//-------------------------------------------------------------------------
// get number of constraints
//-------------------------------------------------------------------------
@@ -2013,9 +2036,12 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
JointMotion* joint_motionp = mJointMotionList->getJointMotion(i);
success &= dp.packString(joint_motionp->mJointName, "joint_name");
success &= dp.packS32(joint_motionp->mPriority, "joint_priority");
- success &= dp.packS32(joint_motionp->mRotationCurve.mNumKeys, "num_rot_keys");
+ success &= dp.packS32(joint_motionp->mRotationCurve.mKeys.size(), "num_rot_keys");
- LL_DEBUGS("BVH") << "Joint " << joint_motionp->mJointName << LL_ENDL;
+ LL_DEBUGS("BVH") << "Joint " << i
+ << " name: " << joint_motionp->mJointName
+ << " Rotation keys: " << joint_motionp->mRotationCurve.mKeys.size()
+ << " Position keys: " << joint_motionp->mPositionCurve.mKeys.size() << LL_ENDL;
for (RotationCurve::key_map_t::iterator iter = joint_motionp->mRotationCurve.mKeys.begin();
iter != joint_motionp->mRotationCurve.mKeys.end(); ++iter)
{
@@ -2037,7 +2063,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
LL_DEBUGS("BVH") << " rot: t " << rot_key.mTime << " angles " << rot_angles.mV[VX] <<","<< rot_angles.mV[VY] <<","<< rot_angles.mV[VZ] << LL_ENDL;
}
- success &= dp.packS32(joint_motionp->mPositionCurve.mNumKeys, "num_pos_keys");
+ success &= dp.packS32(joint_motionp->mPositionCurve.mKeys.size(), "num_pos_keys");
for (PositionCurve::key_map_t::iterator iter = joint_motionp->mPositionCurve.mKeys.begin();
iter != joint_motionp->mPositionCurve.mKeys.end(); ++iter)
{
diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp
index d5adf11264..4a7ead2110 100644
--- a/indra/llcommon/threadpool.cpp
+++ b/indra/llcommon/threadpool.cpp
@@ -39,6 +39,11 @@ void LL::ThreadPool::start()
run(tname);
});
}
+
+ // Special workflow for LLWindowWin32Thread - it's close() should be called explicitly
+ if (mExplicitShutdown)
+ return;
+
// Listen on "LLApp", and when the app is shutting down, close the queue
// and join the workers.
LLEventPumps::instance().obtain("LLApp").listen(
diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h
index f8eec3b457..0a5f14529b 100644
--- a/indra/llcommon/threadpool.h
+++ b/indra/llcommon/threadpool.h
@@ -59,6 +59,10 @@ namespace LL
*/
virtual void run();
+ protected:
+ // LLWindowWin32Thread should set this flag to true
+ bool mExplicitShutdown { false };
+
private:
void run(const std::string& name);
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp
index a219ac1450..fa22145972 100644
--- a/indra/llprimitive/llmaterial.cpp
+++ b/indra/llprimitive/llmaterial.cpp
@@ -426,18 +426,18 @@ bool LLMaterial::operator != (const LLMaterial& rhs) const
}
-U32 LLMaterial::getShaderMask(U32 alpha_mode)
+U32 LLMaterial::getShaderMask(U32 alpha_mode, BOOL is_alpha)
{ //NEVER incorporate this value into the message system -- this function will vary depending on viewer implementation
- U32 ret = 0;
- //two least significant bits are "diffuse alpha mode"
- if (alpha_mode != DIFFUSE_ALPHA_MODE_DEFAULT)
+ //two least significant bits are "diffuse alpha mode"
+ U32 ret = alpha_mode;
+ if (ret == DIFFUSE_ALPHA_MODE_DEFAULT)
{
- ret = alpha_mode;
- }
- else
- {
- ret = getDiffuseAlphaMode();
+ ret = getDiffuseAlphaMode();
+ if (ret == DIFFUSE_ALPHA_MODE_BLEND && !is_alpha)
+ {
+ ret = DIFFUSE_ALPHA_MODE_NONE;
+ }
}
llassert(ret < SHADER_COUNT);
diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h
index d58b7ee812..d92ef1dfba 100644
--- a/indra/llprimitive/llmaterial.h
+++ b/indra/llprimitive/llmaterial.h
@@ -126,7 +126,7 @@ public:
bool operator == (const LLMaterial& rhs) const;
bool operator != (const LLMaterial& rhs) const;
- U32 getShaderMask(U32 alpha_mode = DIFFUSE_ALPHA_MODE_DEFAULT);
+ U32 getShaderMask(U32 alpha_mode, BOOL is_alpha);
protected:
LLUUID mNormalID;
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 1bf061bc8d..6f4f2ec62c 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -494,7 +494,7 @@ F32 LLFontGL::getWidthF32(const std::string& utf8text, S32 begin_offset, S32 max
return getWidthF32(wtext.c_str(), begin_offset, max_chars);
}
-F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars) const
+F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars, bool no_padding) const
{
const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
@@ -517,12 +517,15 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars
F32 advance = mFontFreetype->getXAdvance(fgi);
- // for the last character we want to measure the greater of its width and xadvance values
- // so keep track of the difference between these values for the each character we measure
- // so we can fix things up at the end
- width_padding = llmax( 0.f, // always use positive padding amount
- width_padding - advance, // previous padding left over after advance of current character
- (F32)(fgi->mWidth + fgi->mXBearing) - advance); // difference between width of this character and advance to next character
+ if (!no_padding)
+ {
+ // for the last character we want to measure the greater of its width and xadvance values
+ // so keep track of the difference between these values for the each character we measure
+ // so we can fix things up at the end
+ width_padding = llmax(0.f, // always use positive padding amount
+ width_padding - advance, // previous padding left over after advance of current character
+ (F32)(fgi->mWidth + fgi->mXBearing) - advance); // difference between width of this character and advance to next character
+ }
cur_x += advance;
llwchar next_char = wchars[i+1];
@@ -539,8 +542,11 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars
cur_x = (F32)ll_round(cur_x);
}
- // add in extra pixels for last character's width past its xadvance
- cur_x += width_padding;
+ if (!no_padding)
+ {
+ // add in extra pixels for last character's width past its xadvance
+ cur_x += width_padding;
+ }
return cur_x / sScaleX;
}
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index 3b58a37d33..93c6b78ce8 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -138,7 +138,7 @@ public:
F32 getWidthF32(const std::string& utf8text) const;
F32 getWidthF32(const llwchar* wchars) const;
F32 getWidthF32(const std::string& text, S32 offset, S32 max_chars ) const;
- F32 getWidthF32(const llwchar* wchars, S32 offset, S32 max_chars) const;
+ F32 getWidthF32(const llwchar* wchars, S32 offset, S32 max_chars, bool no_padding = false) const;
// The following are called often, frequently with large buffers, so do not use a string interface
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 9dc140b5b9..465f30a343 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -859,9 +859,16 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
stop_glerror();
if (prev_mip_data)
- delete[] prev_mip_data;
+ {
+ if (prev_mip_data != cur_mip_data)
+ delete[] prev_mip_data;
+ prev_mip_data = nullptr;
+ }
if (cur_mip_data)
+ {
delete[] cur_mip_data;
+ cur_mip_data = nullptr;
+ }
mGLTextureCreated = false;
return FALSE;
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index eba93beed9..e2b5279aab 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -395,7 +395,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height )
// it is purely visual, so it is fine to do at our laisure
refreshSuffix();
}
- mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight;
+ mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight;
mLabelWidthDirty = false;
}
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp
index e01aba402e..2791377a5e 100644
--- a/indra/llui/lliconctrl.cpp
+++ b/indra/llui/lliconctrl.cpp
@@ -37,6 +37,8 @@
#include "lluiimage.h"
#include "llwindow.h"
+#include "llgltexture.h"
+
static LLDefaultChildRegistry::Register<LLIconCtrl> r("icon");
LLIconCtrl::Params::Params()
@@ -94,6 +96,22 @@ BOOL LLIconCtrl::handleHover(S32 x, S32 y, MASK mask)
return LLUICtrl::handleHover(x, y, mask);
}
+void LLIconCtrl::onVisibilityChange(BOOL new_visibility)
+{
+ LLUICtrl::onVisibilityChange(new_visibility);
+ if (mPriority == LLGLTexture::BOOST_ICON)
+ {
+ if (new_visibility)
+ {
+ loadImage(getValue(), mPriority);
+ }
+ else
+ {
+ mImagep = nullptr;
+ }
+ }
+}
+
// virtual
// value might be a string or a UUID
void LLIconCtrl::setValue(const LLSD& value)
@@ -110,6 +128,14 @@ void LLIconCtrl::setValue(const LLSD& value, S32 priority)
tvalue = LLSD(LLUUID(value.asString()));
}
LLUICtrl::setValue(tvalue);
+
+ loadImage(tvalue, priority);
+}
+
+void LLIconCtrl::loadImage(const LLSD& tvalue, S32 priority)
+{
+ if(mPriority == LLGLTexture::BOOST_ICON && !getVisible()) return;
+
if (tvalue.isUUID())
{
mImagep = LLUI::getUIImageByID(tvalue.asUUID(), priority);
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index 9c3b517bca..5d6c544571 100644
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -72,6 +72,7 @@ public:
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
// lluictrl overrides
+ void onVisibilityChange(BOOL new_visibility);
virtual void setValue(const LLSD& value );
std::string getImageName() const;
@@ -95,6 +96,8 @@ protected:
bool mInteractable;
private:
+ void loadImage(const LLSD& value, S32 priority);
+
LLUIColor mColor;
LLPointer<LLUIImage> mImagep;
};
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index b8f47ef6ba..8018365d3e 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -127,6 +127,7 @@ public:
virtual void clearCtrls(); // overridden in LLPanelObject and LLPanelVolume
// Border controls
+ const LLViewBorder* getBorder() const { return mBorder; }
void addBorder( LLViewBorder::Params p);
void addBorder();
void removeBorder();
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 82a3c01c6d..8732a7ce45 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -361,7 +361,7 @@ void LLTextBase::onValueChange(S32 start, S32 end)
{
}
-std::vector<LLRect> LLTextBase::getSelctionRects()
+std::vector<LLRect> LLTextBase::getSelectionRects()
{
// Nor supposed to be called without selection
llassert(hasSelection());
@@ -458,7 +458,7 @@ void LLTextBase::drawSelectionBackground()
// Draw selection even if we don't have keyboard focus for search/replace
if (hasSelection() && !mLineInfoList.empty())
{
- std::vector<LLRect> selection_rects = getSelctionRects();
+ std::vector<LLRect> selection_rects = getSelectionRects();
// Draw the selection box (we're using a box instead of reversing the colors on the selected text).
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -1356,9 +1356,9 @@ void LLTextBase::draw()
drawCursor();
}
- mDocumentView->setVisible(FALSE);
+ mDocumentView->setVisibleDirect(FALSE);
LLUICtrl::draw();
- mDocumentView->setVisible(TRUE);
+ mDocumentView->setVisibleDirect(TRUE);
}
@@ -3464,7 +3464,7 @@ bool LLNormalTextSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& w
height = mFontHeight;
const LLWString &text = getWText();
// if last character is a newline, then return true, forcing line break
- width = mStyle->getFont()->getWidthF32(text.c_str(), mStart + first_char, num_chars);
+ width = mStyle->getFont()->getWidthF32(text.c_str(), mStart + first_char, num_chars, true);
}
return false;
}
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index e3cf56a5ee..3611ab0499 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -638,7 +638,7 @@ protected:
return mLabel.getString() + getToolTip();
}
- std::vector<LLRect> getSelctionRects();
+ std::vector<LLRect> getSelectionRects();
protected:
// text segmentation and flow
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 244f0c6f00..b84bb13edb 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -200,7 +200,6 @@ LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& defa
void LLUIColorTable::setColor(const std::string& name, const LLColor4& color)
{
setColor(name, color, mUserSetColors);
- setColor(name, color, mLoadedColors);
}
bool LLUIColorTable::loadFromSettings()
@@ -229,6 +228,11 @@ void LLUIColorTable::saveUserSettings() const
it != mUserSetColors.end();
++it)
{
+ // Compare user color value with the default value, skip if equal
+ string_color_map_t::const_iterator itd = mLoadedColors.find(it->first);
+ if(itd != mUserSetColors.end() && itd->second == it->second)
+ continue;
+
ColorEntryParams color_entry;
color_entry.name = it->first;
color_entry.color.value = it->second;
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index bec45df78a..8aa97aac39 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -287,6 +287,7 @@ public:
void setAllChildrenEnabled(BOOL b);
virtual void setVisible(BOOL visible);
+ void setVisibleDirect(BOOL visible) { mVisible = visible; }
const BOOL& getVisible() const { return mVisible; }
virtual void setEnabled(BOOL enabled);
BOOL getEnabled() const { return mEnabled; }
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 4380bbdb73..ac4848579f 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -118,7 +118,8 @@ public:
// Sets cursor, may set to arrow+hourglass
virtual void setCursor(ECursorType cursor) { mNextCursor = cursor; };
- virtual ECursorType getCursor() const;
+ virtual ECursorType getCursor() const;
+ virtual ECursorType getNextCursor() const { return mNextCursor; };
virtual void updateCursor() = 0;
virtual void captureMouse() = 0;
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 2e560ddb0a..2f1a631585 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -4592,6 +4592,9 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList()
inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread()
: ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE)
{
+ // Set this flag to true to avoid of implicit call of close() from start()
+ mExplicitShutdown = true;
+
ThreadPool::start();
}
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9fffab70f4..480eebd003 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12962,13 +12962,13 @@
<key>TranslationService</key>
<map>
<key>Comment</key>
- <string>Translation API to use. (google|bing)</string>
+ <string>Translation API to use. (google|azure)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>bing</string>
+ <string>azure</string>
</map>
<key>GoogleTranslateAPIKey</key>
<map>
@@ -12984,7 +12984,7 @@
<key>BingTranslateAPIKey</key>
<map>
<key>Comment</key>
- <string>Bing AppID to use with the Microsoft Translator API</string>
+ <string>(Deprecated) Bing AppID to use with the Microsoft Translator API</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -12992,6 +12992,17 @@
<key>Value</key>
<string></string>
</map>
+ <key>AzureTranslateAPIKey</key>
+ <map>
+ <key>Comment</key>
+ <string>Azure Translation service data to use with the MS Azure Translator API</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>LLSD</string>
+ <key>Value</key>
+ <string></string>
+ </map>
<key>TutorialURL</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index f778634d25..10cde35f9c 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -85,6 +85,7 @@ struct LLAvatarData
std::string profile_url;
U8 caption_index;
std::string caption_text;
+ std::string customer_type;
U32 flags;
BOOL allow_publish;
};
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 5b205d373b..edd0afe357 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -281,6 +281,8 @@ void LLDrawPoolAlpha::renderDebugAlpha()
{
gHighlightProgram.bind();
gGL.diffuseColor4f(1, 0, 0, 1);
+
+
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f * 1024.f);
gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sSmokeImagep);
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index b5f6f80b39..a5604f40ad 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -55,9 +55,6 @@ LLFilePicker LLFilePicker::sInstance;
#define IMAGE_FILTER L"Images (*.tga; *.bmp; *.jpg; *.jpeg; *.png)\0*.tga;*.bmp;*.jpg;*.jpeg;*.png\0"
#define ANIM_FILTER L"Animations (*.bvh; *.anim)\0*.bvh;*.anim\0"
#define COLLADA_FILTER L"Scene (*.dae)\0*.dae\0"
-#ifdef _CORY_TESTING
-#define GEOMETRY_FILTER L"SL Geometry (*.slg)\0*.slg\0"
-#endif
#define XML_FILTER L"XML files (*.xml)\0*.xml\0"
#define SLOBJECT_FILTER L"Objects (*.slobject)\0*.slobject\0"
#define RAW_FILTER L"RAW files (*.raw)\0*.raw\0"
@@ -197,12 +194,6 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter)
mOFN.lpstrFilter = COLLADA_FILTER \
L"\0";
break;
-#ifdef _CORY_TESTING
- case FFLOAD_GEOMETRY:
- mOFN.lpstrFilter = GEOMETRY_FILTER \
- L"\0";
- break;
-#endif
case FFLOAD_XML:
mOFN.lpstrFilter = XML_FILTER \
L"\0";
@@ -480,18 +471,6 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
L"XAF Anim File (*.xaf)\0*.xaf\0" \
L"\0";
break;
-#ifdef _CORY_TESTING
- case FFSAVE_GEOMETRY:
- if (filename.empty())
- {
- wcsncpy( mFilesW,L"untitled.slg", FILENAME_BUFFER_SIZE); /*Flawfinder: ignore*/
- }
- mOFN.lpstrDefExt = L"slg";
- mOFN.lpstrFilter =
- L"SLG SL Geometry File (*.slg)\0*.slg\0" \
- L"\0";
- break;
-#endif
case FFSAVE_XML:
if (filename.empty())
{
@@ -624,11 +603,6 @@ std::unique_ptr<std::vector<std::string>> LLFilePicker::navOpenFilterProc(ELoadF
case FFLOAD_COLLADA:
allowedv->push_back("dae");
break;
-#ifdef _CORY_TESTING
- case FFLOAD_GEOMETRY:
- allowedv->push_back("slg");
- break;
-#endif
case FFLOAD_XML:
allowedv->push_back("xml");
break;
@@ -727,14 +701,6 @@ bool LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& filena
creator = "\?\?\?\?";
extension = "xaf";
break;
-
-#ifdef _CORY_TESTING
- case FFSAVE_GEOMETRY:
- type = "\?\?\?\?";
- creator = "\?\?\?\?";
- extension = "slg";
- break;
-#endif
case FFSAVE_XML:
type = "\?\?\?\?";
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 73baeca1c0..8f2274024c 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -77,9 +77,6 @@ public:
FFLOAD_WAV = 2,
FFLOAD_IMAGE = 3,
FFLOAD_ANIM = 4,
-#ifdef _CORY_TESTING
- FFLOAD_GEOMETRY = 5,
-#endif
FFLOAD_XML = 6,
FFLOAD_SLOBJECT = 7,
FFLOAD_RAW = 8,
@@ -99,9 +96,6 @@ public:
FFSAVE_BMP = 5,
FFSAVE_AVI = 6,
FFSAVE_ANIM = 7,
-#ifdef _CORY_TESTING
- FFSAVE_GEOMETRY = 8,
-#endif
FFSAVE_XML = 9,
FFSAVE_COLLADA = 10,
FFSAVE_RAW = 11,
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index f1807f1c5b..0d2c6d8e4c 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -108,6 +108,8 @@ LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&cb_do_nothing));
mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&cb_do_nothing));
mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&cb_do_nothing));
+
+ mMinFloaterHeight = EXPANDED_MIN_HEIGHT;
}
//static
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 78271369d2..af4e7f5aff 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -92,6 +92,8 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMSessionTab::enableContextMenuItem, this, _2));
mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMSessionTab::doToSelected, this, _2));
mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&cb_group_do_nothing));
+
+ mMinFloaterHeight = getMinHeight();
}
LLFloaterIMSessionTab::~LLFloaterIMSessionTab()
@@ -934,10 +936,13 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse)
S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight()
+ mChatLayoutPanel->getRect().getHeight() - mChatLayoutPanelHeight + 2;
floater_rect.mTop -= height;
+
+ setResizeLimits(getMinWidth(), floater_rect.getHeight());
}
else
{
floater_rect.mTop = floater_rect.mBottom + mFloaterHeight;
+ setResizeLimits(getMinWidth(), mMinFloaterHeight);
}
enableResizeCtrls(true, true, !collapse);
@@ -962,6 +967,7 @@ void LLFloaterIMSessionTab::restoreFloater()
setShape(floater_rect, true);
mBodyStack->updateLayout();
mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon"));
+ setResizeLimits(getMinWidth(), mMinFloaterHeight);
setMessagePaneExpanded(true);
saveCollapsedState();
mInputEditor->enableSingleLineMode(false);
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index 9f00917647..d478922617 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -152,6 +152,7 @@ protected:
bool mMessagePaneExpanded;
bool mIsParticipantListExpanded;
+ S32 mMinFloaterHeight;
LLIMModel::LLIMSession* mSession;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index da7a4733c7..a24f04ccfb 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -317,7 +317,6 @@ void LLFloaterRegionInfo::onOpen(const LLSD& key)
}
refreshFromRegion(gAgent.getRegion());
requestRegionInfo();
- requestMeshRezInfo();
if (!mGodLevelChangeSlot.connected())
{
@@ -1006,19 +1005,6 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
return false;
}
-void LLFloaterRegionInfo::requestMeshRezInfo()
-{
- std::string sim_console_url = gAgent.getRegionCapability("SimConsoleAsync");
-
- if (!sim_console_url.empty())
- {
- std::string request_str = "get mesh_rez_enabled";
-
- LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(sim_console_url, LLSD(request_str),
- "Requested mesh_rez_enabled", "Error requesting mesh_rez_enabled");
- }
-}
-
// setregioninfo
// strings[0] = 'Y' - block terraform, 'N' - not
// strings[1] = 'Y' - block fly, 'N' - not
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index c34dbb62e8..3eb39b250f 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -102,7 +102,6 @@ public:
void onRegionChanged();
void requestRegionInfo();
- void requestMeshRezInfo();
void enableTopButtons();
void disableTopButtons();
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
index 082bb888b1..e14227f490 100644
--- a/indra/newview/llfloatertranslationsettings.cpp
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -45,14 +45,7 @@
LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key)
: LLFloater(key)
, mMachineTranslationCB(NULL)
-, mLanguageCombo(NULL)
-, mTranslationServiceRadioGroup(NULL)
-, mBingAPIKeyEditor(NULL)
-, mGoogleAPIKeyEditor(NULL)
-, mBingVerifyBtn(NULL)
-, mGoogleVerifyBtn(NULL)
-, mOKBtn(NULL)
-, mBingKeyVerified(false)
+, mAzureKeyVerified(false)
, mGoogleKeyVerified(false)
{
}
@@ -63,9 +56,11 @@ BOOL LLFloaterTranslationSettings::postBuild()
mMachineTranslationCB = getChild<LLCheckBoxCtrl>("translate_chat_checkbox");
mLanguageCombo = getChild<LLComboBox>("translate_language_combo");
mTranslationServiceRadioGroup = getChild<LLRadioGroup>("translation_service_rg");
- mBingAPIKeyEditor = getChild<LLLineEditor>("bing_api_key");
+ mAzureAPIEndpointEditor = getChild<LLComboBox>("azure_api_endpoint_combo");
+ mAzureAPIKeyEditor = getChild<LLLineEditor>("azure_api_key");
+ mAzureAPIRegionEditor = getChild<LLLineEditor>("azure_api_region");
mGoogleAPIKeyEditor = getChild<LLLineEditor>("google_api_key");
- mBingVerifyBtn = getChild<LLButton>("verify_bing_api_key_btn");
+ mAzureVerifyBtn = getChild<LLButton>("verify_azure_api_key_btn");
mGoogleVerifyBtn = getChild<LLButton>("verify_google_api_key_btn");
mOKBtn = getChild<LLButton>("ok_btn");
@@ -73,11 +68,17 @@ BOOL LLFloaterTranslationSettings::postBuild()
mTranslationServiceRadioGroup->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
mOKBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnOK, this));
getChild<LLButton>("cancel_btn")->setClickedCallback(boost::bind(&LLFloater::closeFloater, this, false));
- mBingVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnBingVerify, this));
+ mAzureVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnAzureVerify, this));
mGoogleVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnGoogleVerify, this));
- mBingAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
- mBingAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onBingKeyEdited, this), NULL);
+ mAzureAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
+ mAzureAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onAzureKeyEdited, this), NULL);
+ mAzureAPIRegionEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
+ mAzureAPIRegionEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onAzureKeyEdited, this), NULL);
+
+ mAzureAPIEndpointEditor->setFocusLostCallback(boost::bind(&LLFloaterTranslationSettings::onAzureKeyEdited, this));
+ mAzureAPIEndpointEditor->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::onAzureKeyEdited, this));
+
mGoogleAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
mGoogleAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onGoogleKeyEdited, this), NULL);
@@ -92,17 +93,28 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key)
mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), TRUE);
mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE);
- std::string bing_key = gSavedSettings.getString("BingTranslateAPIKey");
- if (!bing_key.empty())
+ LLSD azure_key = gSavedSettings.getLLSD("AzureTranslateAPIKey");
+ if (azure_key.isMap() && !azure_key["id"].asString().empty())
{
- mBingAPIKeyEditor->setText(bing_key);
- mBingAPIKeyEditor->setTentative(FALSE);
- verifyKey(LLTranslate::SERVICE_BING, bing_key, false);
+ mAzureAPIKeyEditor->setText(azure_key["id"].asString());
+ mAzureAPIKeyEditor->setTentative(false);
+ if (azure_key.has("region") && !azure_key["region"].asString().empty())
+ {
+ mAzureAPIRegionEditor->setText(azure_key["region"].asString());
+ mAzureAPIRegionEditor->setTentative(false);
+ }
+ else
+ {
+ mAzureAPIRegionEditor->setTentative(true);
+ }
+ mAzureAPIEndpointEditor->setValue(azure_key["endpoint"]);
+ verifyKey(LLTranslate::SERVICE_AZURE, azure_key, false);
}
else
{
- mBingAPIKeyEditor->setTentative(TRUE);
- mBingKeyVerified = FALSE;
+ mAzureAPIKeyEditor->setTentative(TRUE);
+ mAzureAPIRegionEditor->setTentative(true);
+ mAzureKeyVerified = FALSE;
}
std::string google_key = gSavedSettings.getString("GoogleTranslateAPIKey");
@@ -121,22 +133,22 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key)
updateControlsEnabledState();
}
-void LLFloaterTranslationSettings::setBingVerified(bool ok, bool alert)
+void LLFloaterTranslationSettings::setAzureVerified(bool ok, bool alert, S32 status)
{
if (alert)
{
- showAlert(ok ? "bing_api_key_verified" : "bing_api_key_not_verified");
+ showAlert(ok ? "azure_api_key_verified" : "azure_api_key_not_verified", status);
}
- mBingKeyVerified = ok;
+ mAzureKeyVerified = ok;
updateControlsEnabledState();
}
-void LLFloaterTranslationSettings::setGoogleVerified(bool ok, bool alert)
+void LLFloaterTranslationSettings::setGoogleVerified(bool ok, bool alert, S32 status)
{
if (alert)
{
- showAlert(ok ? "google_api_key_verified" : "google_api_key_not_verified");
+ showAlert(ok ? "google_api_key_verified" : "google_api_key_not_verified", status);
}
mGoogleKeyVerified = ok;
@@ -148,9 +160,19 @@ std::string LLFloaterTranslationSettings::getSelectedService() const
return mTranslationServiceRadioGroup->getSelectedValue().asString();
}
-std::string LLFloaterTranslationSettings::getEnteredBingKey() const
+LLSD LLFloaterTranslationSettings::getEnteredAzureKey() const
{
- return mBingAPIKeyEditor->getTentative() ? LLStringUtil::null : mBingAPIKeyEditor->getText();
+ LLSD key;
+ if (!mAzureAPIKeyEditor->getTentative())
+ {
+ key["endpoint"] = mAzureAPIEndpointEditor->getValue();
+ key["id"] = mAzureAPIKeyEditor->getText();
+ if (!mAzureAPIRegionEditor->getTentative())
+ {
+ key["region"] = mAzureAPIRegionEditor->getText();
+ }
+ }
+ return key;
}
std::string LLFloaterTranslationSettings::getEnteredGoogleKey() const
@@ -158,10 +180,15 @@ std::string LLFloaterTranslationSettings::getEnteredGoogleKey() const
return mGoogleAPIKeyEditor->getTentative() ? LLStringUtil::null : mGoogleAPIKeyEditor->getText();
}
-void LLFloaterTranslationSettings::showAlert(const std::string& msg_name) const
+void LLFloaterTranslationSettings::showAlert(const std::string& msg_name, S32 status) const
{
+ LLStringUtil::format_map_t string_args;
+ // For now just show an http error code, whole 'reason' string might be added later
+ string_args["[STATUS]"] = llformat("%d", status);
+ std::string message = getString(msg_name, string_args);
+
LLSD args;
- args["MESSAGE"] = getString(msg_name);
+ args["MESSAGE"] = message;
LLNotificationsUtil::add("GenericAlert", args);
}
@@ -170,34 +197,38 @@ void LLFloaterTranslationSettings::updateControlsEnabledState()
// Enable/disable controls based on the checkbox value.
bool on = mMachineTranslationCB->getValue().asBoolean();
std::string service = getSelectedService();
- bool bing_selected = service == "bing";
+ bool azure_selected = service == "azure";
bool google_selected = service == "google";
mTranslationServiceRadioGroup->setEnabled(on);
mLanguageCombo->setEnabled(on);
- getChild<LLTextBox>("bing_api_key_label")->setEnabled(on);
- mBingAPIKeyEditor->setEnabled(on);
+ getChild<LLTextBox>("azure_api_endoint_label")->setEnabled(on);
+ mAzureAPIEndpointEditor->setEnabled(on);
+ getChild<LLTextBox>("azure_api_key_label")->setEnabled(on);
+ mAzureAPIKeyEditor->setEnabled(on);
+ getChild<LLTextBox>("azure_api_region_label")->setEnabled(on);
+ mAzureAPIRegionEditor->setEnabled(on);
getChild<LLTextBox>("google_api_key_label")->setEnabled(on);
mGoogleAPIKeyEditor->setEnabled(on);
- mBingAPIKeyEditor->setEnabled(on && bing_selected);
+ mAzureAPIKeyEditor->setEnabled(on && azure_selected);
mGoogleAPIKeyEditor->setEnabled(on && google_selected);
- mBingVerifyBtn->setEnabled(on && bing_selected &&
- !mBingKeyVerified && !getEnteredBingKey().empty());
+ mAzureVerifyBtn->setEnabled(on && azure_selected &&
+ !mAzureKeyVerified && getEnteredAzureKey().isMap());
mGoogleVerifyBtn->setEnabled(on && google_selected &&
!mGoogleKeyVerified && !getEnteredGoogleKey().empty());
- bool service_verified = (bing_selected && mBingKeyVerified) || (google_selected && mGoogleKeyVerified);
+ bool service_verified = (azure_selected && mAzureKeyVerified) || (google_selected && mGoogleKeyVerified);
gSavedPerAccountSettings.setBOOL("TranslatingEnabled", service_verified);
mOKBtn->setEnabled(!on || service_verified);
}
/*static*/
-void LLFloaterTranslationSettings::setVerificationStatus(int service, bool ok, bool alert)
+void LLFloaterTranslationSettings::setVerificationStatus(int service, bool ok, bool alert, S32 status)
{
LLFloaterTranslationSettings* floater =
LLFloaterReg::getTypedInstance<LLFloaterTranslationSettings>("prefs_translation");
@@ -210,20 +241,20 @@ void LLFloaterTranslationSettings::setVerificationStatus(int service, bool ok, b
switch (service)
{
- case LLTranslate::SERVICE_BING:
- floater->setBingVerified(ok, alert);
+ case LLTranslate::SERVICE_AZURE:
+ floater->setAzureVerified(ok, alert, status);
break;
case LLTranslate::SERVICE_GOOGLE:
- floater->setGoogleVerified(ok, alert);
+ floater->setGoogleVerified(ok, alert, status);
break;
}
}
-void LLFloaterTranslationSettings::verifyKey(int service, const std::string& key, bool alert)
+void LLFloaterTranslationSettings::verifyKey(int service, const LLSD& key, bool alert)
{
LLTranslate::verifyKey(static_cast<LLTranslate::EService>(service), key,
- boost::bind(&LLFloaterTranslationSettings::setVerificationStatus, _1, _2, alert));
+ boost::bind(&LLFloaterTranslationSettings::setVerificationStatus, _1, _2, alert, _3));
}
void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control)
@@ -239,11 +270,14 @@ void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control)
}
}
-void LLFloaterTranslationSettings::onBingKeyEdited()
+void LLFloaterTranslationSettings::onAzureKeyEdited()
{
- if (mBingAPIKeyEditor->isDirty())
+ if (mAzureAPIKeyEditor->isDirty()
+ || mAzureAPIRegionEditor->isDirty()
+ || mAzureAPIEndpointEditor->getValue().isString())
{
- setBingVerified(false, false);
+ // todo: verify mAzureAPIEndpointEditor url
+ setAzureVerified(false, false, 0);
}
}
@@ -251,16 +285,16 @@ void LLFloaterTranslationSettings::onGoogleKeyEdited()
{
if (mGoogleAPIKeyEditor->isDirty())
{
- setGoogleVerified(false, false);
+ setGoogleVerified(false, false, 0);
}
}
-void LLFloaterTranslationSettings::onBtnBingVerify()
+void LLFloaterTranslationSettings::onBtnAzureVerify()
{
- std::string key = getEnteredBingKey();
- if (!key.empty())
+ LLSD key = getEnteredAzureKey();
+ if (key.isMap())
{
- verifyKey(LLTranslate::SERVICE_BING, key);
+ verifyKey(LLTranslate::SERVICE_AZURE, key);
}
}
@@ -269,16 +303,16 @@ void LLFloaterTranslationSettings::onBtnGoogleVerify()
std::string key = getEnteredGoogleKey();
if (!key.empty())
{
- verifyKey(LLTranslate::SERVICE_GOOGLE, key);
+ verifyKey(LLTranslate::SERVICE_GOOGLE, LLSD(key));
}
}
void LLFloaterTranslationSettings::onClose(bool app_quitting)
{
std::string service = gSavedSettings.getString("TranslationService");
- bool bing_selected = service == "bing";
+ bool azure_selected = service == "azure";
bool google_selected = service == "google";
- bool service_verified = (bing_selected && mBingKeyVerified) || (google_selected && mGoogleKeyVerified);
+ bool service_verified = (azure_selected && mAzureKeyVerified) || (google_selected && mGoogleKeyVerified);
gSavedPerAccountSettings.setBOOL("TranslatingEnabled", service_verified);
}
@@ -287,7 +321,7 @@ void LLFloaterTranslationSettings::onBtnOK()
gSavedSettings.setBOOL("TranslateChat", mMachineTranslationCB->getValue().asBoolean());
gSavedSettings.setString("TranslateLanguage", mLanguageCombo->getSelectedValue().asString());
gSavedSettings.setString("TranslationService", getSelectedService());
- gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());
+ gSavedSettings.setLLSD("AzureTranslateAPIKey", getEnteredAzureKey());
gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey());
closeFloater(false);
diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h
index 2a15eacded..f039d90e27 100644
--- a/indra/newview/llfloatertranslationsettings.h
+++ b/indra/newview/llfloatertranslationsettings.h
@@ -42,37 +42,39 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
- void setBingVerified(bool ok, bool alert);
- void setGoogleVerified(bool ok, bool alert);
+ void setAzureVerified(bool ok, bool alert, S32 status);
+ void setGoogleVerified(bool ok, bool alert, S32 status);
void onClose(bool app_quitting);
private:
std::string getSelectedService() const;
- std::string getEnteredBingKey() const;
+ LLSD getEnteredAzureKey() const;
std::string getEnteredGoogleKey() const;
- void showAlert(const std::string& msg_name) const;
+ void showAlert(const std::string& msg_name, S32 status) const;
void updateControlsEnabledState();
- void verifyKey(int service, const std::string& key, bool alert = true);
+ void verifyKey(int service, const LLSD& key, bool alert = true);
void onEditorFocused(LLFocusableElement* control);
- void onBingKeyEdited();
+ void onAzureKeyEdited();
void onGoogleKeyEdited();
- void onBtnBingVerify();
+ void onBtnAzureVerify();
void onBtnGoogleVerify();
void onBtnOK();
- static void setVerificationStatus(int service, bool alert, bool ok);
+ static void setVerificationStatus(int service, bool alert, bool ok, S32 status);
LLCheckBoxCtrl* mMachineTranslationCB;
LLComboBox* mLanguageCombo;
- LLLineEditor* mBingAPIKeyEditor;
+ LLComboBox* mAzureAPIEndpointEditor;;
+ LLLineEditor* mAzureAPIKeyEditor;
+ LLLineEditor* mAzureAPIRegionEditor;
LLLineEditor* mGoogleAPIKeyEditor;
LLRadioGroup* mTranslationServiceRadioGroup;
- LLButton* mBingVerifyBtn;
+ LLButton* mAzureVerifyBtn;
LLButton* mGoogleVerifyBtn;
LLButton* mOKBtn;
- bool mBingKeyVerified;
+ bool mAzureKeyVerified;
bool mGoogleKeyVerified;
};
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 4a9b471a47..0bb56c7d0c 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -408,6 +408,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
// *TODO: Think I'd like to get a shared pointer to this and share it
// among all the folder requests.
uuid_vec_t recursive_cats;
+ uuid_vec_t all_cats; // dupplicate avoidance
LLSD folder_request_body;
LLSD folder_request_body_lib;
@@ -436,7 +437,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
{
const LLViewerInventoryCategory * cat(gInventory.getCategory(cat_id));
- if (cat)
+ if (cat && std::find(all_cats.begin(), all_cats.end(), cat_id) == all_cats.end())
{
if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
{
@@ -477,6 +478,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
{
recursive_cats.push_back(cat_id);
}
+ all_cats.push_back(cat_id);
}
else
{
@@ -796,6 +798,46 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
<< LLCoreHttpUtil::responseToString(response) << "]" << LL_ENDL;
// Could use a 404 test here to try to detect revoked caps...
+
+ if(status == LLCore::HttpStatus(HTTP_FORBIDDEN))
+ {
+ // too large, split into two, assume that this isn't the library
+ const std::string url(gAgent.getRegionCapability("FetchInventoryDescendents2"));
+ S32 size = mRequestSD["folders"].size();
+
+ if (!gDisconnected && !LLApp::isExiting() && !url.empty() && size > 1)
+ {
+ LLSD folders;
+ uuid_vec_t recursive_cats;
+ LLSD::array_iterator iter = mRequestSD["folders"].beginArray();
+ LLSD::array_iterator end = mRequestSD["folders"].endArray();
+ while (iter != end)
+ {
+ folders.append(*iter);
+ LLUUID fodler_id = iter->get("folder_id").asUUID();
+ if (std::find(mRecursiveCatUUIDs.begin(), mRecursiveCatUUIDs.end(), fodler_id) != mRecursiveCatUUIDs.end())
+ {
+ recursive_cats.push_back(fodler_id);
+ }
+ if (folders.size() == (S32)(size / 2))
+ {
+ LLSD request_body;
+ request_body["folders"] = folders;
+ LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
+ gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
+ recursive_cats.clear();
+ folders.clear();
+ }
+ iter++;
+ }
+
+ LLSD request_body;
+ request_body["folders"] = folders;
+ LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
+ gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
+ return;
+ }
+ }
// This was originally the request retry logic for the inventory
// request which tested on HTTP_INTERNAL_ERROR status. This
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 8029486d6f..2799cb4cdf 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1268,8 +1268,10 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = LLView::handleHover(x, y, mask);
if(handled)
- {
- ECursorType cursor = getWindow()->getCursor();
+ {
+ // getCursor gets current cursor, setCursor sets next cursor
+ // check that children didn't set own 'next' cursor
+ ECursorType cursor = getWindow()->getNextCursor();
if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW)
{
// replace arrow cursor with arrow and hourglass cursor
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 178aba11a3..cbb87f63bb 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -831,7 +831,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
{ //set state of UI to match state of texture entry(ies) (calls setEnabled, setValue, etc, but NOT setVisible)
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
- if( objectp
+ if (objectp
&& objectp->getPCode() == LL_PCODE_VOLUME
&& objectp->permModify())
{
@@ -854,7 +854,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
- if(radio_mat_type)
+ if (radio_mat_type)
{
if (radio_mat_type->getSelectedIndex() < MATTYPE_DIFFUSE)
{
@@ -871,10 +871,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings"));
updateVisibility();
- bool identical = true; // true because it is anded below
- bool identical_diffuse = false;
- bool identical_norm = false;
- bool identical_spec = false;
+ bool identical = true; // true because it is anded below
+ bool identical_diffuse = false;
+ bool identical_norm = false;
+ bool identical_spec = false;
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
LLTextureCtrl* shinytexture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
@@ -888,12 +888,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
{
getChildView("color label")->setEnabled(editable);
}
- LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("colorswatch");
+ LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("colorswatch");
- LLColor4 color = LLColor4::white;
- bool identical_color = false;
+ LLColor4 color = LLColor4::white;
+ bool identical_color = false;
- if(color_swatch)
+ if (color_swatch)
{
LLSelectedTE::getColor(color, identical_color);
LLColor4 prev_color = color_swatch->get();
@@ -927,7 +927,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
LLCtrlSelectionInterface* combobox_shininess = childGetSelectionInterface("combobox shininess");
if (combobox_shininess)
- {
+ {
combobox_shininess->selectNthItem((S32)shiny);
}
@@ -947,8 +947,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChild<LLUICtrl>("shinycolorswatch")->setTentative(!identical_spec);
LLColorSwatchCtrl* mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
- if(mShinyColorSwatch)
- {
+ if (mShinyColorSwatch)
+ {
mShinyColorSwatch->setValid(editable);
mShinyColorSwatch->setEnabled( editable );
mShinyColorSwatch->setCanApplyImmediately( editable );
@@ -956,7 +956,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
U8 bumpy = 0;
// Bumpy
- {
+ {
bool identical_bumpy = false;
LLSelectedTE::getBumpmap(bumpy,identical_bumpy);
@@ -966,18 +966,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bumpy = norm_map_id.isNull() ? bumpy : BUMPY_TEXTURE;
if (combobox_bumpiness)
- {
+ {
combobox_bumpiness->selectNthItem((S32)bumpy);
- }
+ }
else
- {
+ {
LL_WARNS() << "failed childGetSelectionInterface for 'combobox bumpiness'" << LL_ENDL;
- }
+ }
getChildView("combobox bumpiness")->setEnabled(editable);
getChild<LLUICtrl>("combobox bumpiness")->setTentative(!identical_bumpy);
getChildView("label bumpiness")->setEnabled(editable);
- }
+ }
// Texture
{
@@ -991,25 +991,25 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool identical_image_format = false;
LLSelectedTE::getImageFormat(image_format, identical_image_format);
- mIsAlpha = FALSE;
- switch (image_format)
- {
- case GL_RGBA:
- case GL_ALPHA:
- {
- mIsAlpha = TRUE;
- }
- break;
-
- case GL_RGB: break;
- default:
- {
- LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
- }
- break;
+ mIsAlpha = FALSE;
+ switch (image_format)
+ {
+ case GL_RGBA:
+ case GL_ALPHA:
+ {
+ mIsAlpha = TRUE;
+ }
+ break;
+
+ case GL_RGB: break;
+ default:
+ {
+ LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
}
+ break;
+ }
- if(LLViewerMedia::getInstance()->textureHasMedia(id))
+ if (LLViewerMedia::getInstance()->textureHasMedia(id))
{
getChildView("button align")->setEnabled(editable);
}
@@ -1046,7 +1046,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
updateAlphaControls();
if (texture_ctrl)
- {
+ {
if (identical_diffuse)
{
texture_ctrl->setTentative(FALSE);
@@ -1060,8 +1060,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
texture_ctrl->setBakeTextureEnabled(TRUE);
}
else if (id.isNull())
- {
- // None selected
+ {
+ // None selected
texture_ctrl->setTentative(FALSE);
texture_ctrl->setEnabled(FALSE);
texture_ctrl->setImageAssetID(LLUUID::null);
@@ -1071,10 +1071,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("label maskcutoff")->setEnabled(FALSE);
texture_ctrl->setBakeTextureEnabled(false);
- }
- else
- {
- // Tentative: multiple selected with different textures
+ }
+ else
+ {
+ // Tentative: multiple selected with different textures
texture_ctrl->setTentative(TRUE);
texture_ctrl->setEnabled(editable);
texture_ctrl->setImageAssetID(id);
@@ -1085,7 +1085,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
texture_ctrl->setBakeTextureEnabled(TRUE);
}
-
}
if (shinytexture_ctrl)
@@ -1343,15 +1342,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
combobox_texgen->selectNthItem(((S32)selected_texgen) >> 1);
}
else
- {
+ {
LL_WARNS() << "failed childGetSelectionInterface for 'combobox texgen'" << LL_ENDL;
- }
+ }
getChildView("combobox texgen")->setEnabled(editable);
getChild<LLUICtrl>("combobox texgen")->setTentative(!identical);
getChildView("tex gen")->setEnabled(editable);
-
- }
+ }
{
U8 fullbright_flag = 0;
@@ -1380,7 +1378,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen");
if (mComboTexGen)
- {
+ {
S32 index = mComboTexGen ? mComboTexGen->getCurrentIndex() : 0;
BOOL enabled = editable && (index != 1);
BOOL identical_repeats = true;
@@ -1390,26 +1388,26 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
LLSelectMgr::getInstance()->setTextureChannel(LLRender::eTexIndex(material_type));
switch (material_type)
- {
+ {
default:
case MATTYPE_DIFFUSE:
- {
+ {
enabled = editable && !id.isNull();
identical_repeats = identical_diff_repeats;
repeats = repeats_diff;
- }
+ }
break;
case MATTYPE_SPECULAR:
- {
+ {
enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull()));
identical_repeats = identical_spec_repeats;
repeats = repeats_spec;
- }
+ }
break;
case MATTYPE_NORMAL:
- {
+ {
enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull()));
identical_repeats = identical_norm_repeats;
repeats = repeats_norm;
@@ -1458,14 +1456,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (!mIsAlpha)
{ // ... unless there is no alpha channel in the texture, in which case alpha mode MUST ebe none
alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
- }
+ }
combobox_alphamode->selectNthItem(alpha_mode);
- }
- else
- {
+ }
+ else
+ {
LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
- }
+ }
getChild<LLUICtrl>("maskcutoff")->setValue(material->getAlphaMaskCutoff());
updateAlphaControls();
@@ -1477,15 +1475,15 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
texture_ctrl->setImageAssetID(material->getSpecularID());
if (!material->getSpecularID().isNull() && (shiny == SHINY_TEXTURE))
- {
+ {
material->getSpecularOffset(offset_x,offset_y);
material->getSpecularRepeat(repeat_x,repeat_y);
if (identical_planar_texgen)
- {
+ {
repeat_x *= 2.0f;
repeat_y *= 2.0f;
- }
+ }
rot = material->getSpecularRotation();
getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x);
@@ -1497,7 +1495,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity());
updateShinyControls(!material->getSpecularID().isNull(), true);
- }
+ }
// Assert desired colorswatch color to match material AFTER updateShinyControls
// to avoid getting overwritten with the default on some UI state changes.
@@ -1559,14 +1557,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
// Disable non-UICtrls
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
- if(texture_ctrl)
+ if (texture_ctrl)
{
texture_ctrl->setImageAssetID( LLUUID::null );
texture_ctrl->setEnabled( FALSE ); // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl.
// texture_ctrl->setValid(FALSE);
}
LLColorSwatchCtrl* mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
- if(mColorSwatch)
+ if (mColorSwatch)
{
mColorSwatch->setEnabled( FALSE );
mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") );
@@ -1609,7 +1607,6 @@ void LLPanelFace::updateCopyTexButton()
&& (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1));
std::string tooltip = (objectp && objectp->isInventoryPending()) ? LLTrans::getString("LoadingContents") : getString("paste_options");
mMenuClipboardTexture->setToolTip(tooltip);
-
}
void LLPanelFace::refresh()
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 44bc442bbb..aaf8eddaf7 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -134,8 +134,7 @@ protected:
void sendTexGen(); // applies and sends bump map
void sendShiny(U32 shininess); // applies and sends shininess
void sendFullbright(); // applies and sends full bright
- void sendGlow();
- void sendMedia();
+ void sendGlow();
void alignTestureLayer();
void updateCopyTexButton();
@@ -240,7 +239,6 @@ protected:
private:
-
bool isAlpha() { return mIsAlpha; }
// Convenience funcs to keep the visual flack to a minimum
@@ -249,10 +247,10 @@ private:
LLUUID getCurrentSpecularMap();
U32 getCurrentShininess();
U32 getCurrentBumpiness();
- U8 getCurrentDiffuseAlphaMode();
- U8 getCurrentAlphaMaskCutoff();
- U8 getCurrentEnvIntensity();
- U8 getCurrentGlossiness();
+ U8 getCurrentDiffuseAlphaMode();
+ U8 getCurrentAlphaMaskCutoff();
+ U8 getCurrentEnvIntensity();
+ U8 getCurrentGlossiness();
F32 getCurrentBumpyRot();
F32 getCurrentBumpyScaleU();
F32 getCurrentBumpyScaleV();
@@ -328,7 +326,7 @@ private:
U32 new_alpha_mode = new_material->getDiffuseAlphaMode();
LLUUID new_normal_map_id = new_material->getNormalID();
- LLUUID new_spec_map_id = new_material->getSpecularID();
+ LLUUID new_spec_map_id = new_material->getSpecularID();
if ((new_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) && !is_alpha_face)
{
@@ -540,7 +538,6 @@ public:
class LLSelectedTE
{
public:
-
static void getFace(class LLFace*& face_to_return, bool& identical_face);
static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face);
static void getTexId(LLUUID& id, bool& identical);
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index bd40c9dd2b..6a82a3b35d 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1368,7 +1368,8 @@ void LLPanelObjectInventory::reset()
LLEditMenuHandler::gEditMenuHandler = mFolders;
}
- LLRect scroller_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
+ int offset = hasBorder() ? getBorder()->getBorderWidth() << 1 : 0;
+ LLRect scroller_rect(0, getRect().getHeight() - offset, getRect().getWidth() - offset, 0);
LLScrollContainer::Params scroll_p;
scroll_p.name("task inventory scroller");
scroll_p.rect(scroller_rect);
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 708ff26ced..34e1fd09d8 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -159,6 +159,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_data->fl_about_text = result["fl_about_text"].asString();
avatar_data->born_on = result["member_since"].asDate();
avatar_data->profile_url = getProfileURL(agent_id.asString());
+ avatar_data->customer_type = result["customer_type"].asString();
avatar_data->flags = 0;
@@ -1051,6 +1052,8 @@ void LLPanelProfileSecondLife::resetData()
mCantEditObjectsIcon->setEnabled(false);
childSetVisible("partner_layout", FALSE);
+ childSetVisible("badge_layout", FALSE);
+ childSetVisible("partner_spacer_layout", TRUE);
}
void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
@@ -1258,6 +1261,59 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
std::string caption_text = getString("CaptionTextAcctInfo", args);
getChild<LLUICtrl>("account_info")->setValue(caption_text);
+
+ const S32 LINDEN_EMPLOYEE_INDEX = 3;
+ LLDate sl_release;
+ sl_release.fromYMDHMS(2003, 6, 23, 0, 0, 0);
+ std::string customer_lower = avatar_data->customer_type;
+ LLStringUtil::toLower(customer_lower);
+ if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX)
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Linden");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLinden"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (avatar_data->born_on < sl_release)
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBeta"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "beta_lifetime")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBetaLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "lifetime")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "premium_lifetime")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Premium_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "pplus_lifetime" || customer_lower == "premium_plus_lifetime")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Pplus_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumPlusLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else
+ {
+ childSetVisible("badge_layout", FALSE);
+ childSetVisible("partner_spacer_layout", TRUE);
+ }
}
void LLPanelProfileSecondLife::fillRightsData()
@@ -1412,7 +1468,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
}
else
{
- childSetVisible("frind_layout", false);
+ childSetVisible("friend_layout", false);
childSetVisible("online_layout", false);
childSetVisible("offline_layout", false);
}
@@ -1420,7 +1476,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
void LLPanelProfileSecondLife::processOnlineStatus(bool is_friend, bool show_online, bool online)
{
- childSetVisible("frind_layout", is_friend);
+ childSetVisible("friend_layout", is_friend);
childSetVisible("online_layout", online && show_online);
childSetVisible("offline_layout", !online && show_online);
}
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 45d0252e4f..db3a3c6de5 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -529,6 +529,7 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id)
pick_name = parcel->getName();
pick_desc = parcel->getDesc();
snapshot_id = parcel->getSnapshotID();
+ mPickDescription->setParseHTML(false);
}
LLViewerRegion* region = gAgent.getRegion();
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 3347c40687..bc9f0cef83 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -566,7 +566,7 @@ void LLPanelWearing::onRemoveAttachment()
{
LLSelectMgr::getInstance()->deselectAll();
LLSelectMgr::getInstance()->selectObjectAndFamily(mAttachmentsMap[item->getUUID()]);
- LLSelectMgr::getInstance()->sendDropAttachment();
+ LLSelectMgr::getInstance()->sendDetach();
}
}
diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp
index 140cbbedbe..3278bd3aa9 100644
--- a/indra/newview/llscripteditor.cpp
+++ b/indra/newview/llscripteditor.cpp
@@ -187,7 +187,7 @@ void LLScriptEditor::drawSelectionBackground()
// Draw selection even if we don't have keyboard focus for search/replace
if( hasSelection() && !mLineInfoList.empty())
{
- std::vector<LLRect> selection_rects = getSelctionRects();
+ std::vector<LLRect> selection_rects = getSelectionRects();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
const LLColor4& color = mReadOnly ? mReadOnlyFgColor : mFgColor;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index bcb57d2237..23d1cec7b8 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1393,8 +1393,16 @@ bool idle_startup()
}
else if (regionp->capabilitiesError())
{
- // Try to connect despite capabilities' error state
- LLStartUp::setStartupState(STATE_SEED_CAP_GRANTED);
+ LL_WARNS("AppInit") << "Failed to get capabilities. Backing up to login screen!" << LL_ENDL;
+ if (gRememberPassword)
+ {
+ LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status);
+ }
+ else
+ {
+ LLNotificationsUtil::add("LoginPacketNeverReceivedNoTP", LLSD(), LLSD(), login_alert_status);
+ }
+ reset_login();
}
else
{
@@ -1900,6 +1908,7 @@ bool idle_startup()
LLNotificationsUtil::add("InventoryUnusable");
}
+ LLInventoryModelBackgroundFetch::instance().start();
gInventory.createCommonSystemCategories();
// It's debatable whether this flag is a good idea - sets all
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 34d3ed8bb1..6589ce06c4 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -41,8 +41,8 @@
#include "llurlregistry.h"
-static const std::string BING_NOTRANSLATE_OPENING_TAG("<div class=\"notranslate\">");
-static const std::string BING_NOTRANSLATE_CLOSING_TAG("</div>");
+static const std::string AZURE_NOTRANSLATE_OPENING_TAG("<div translate=\"no\">");
+static const std::string AZURE_NOTRANSLATE_CLOSING_TAG("</div>");
/**
* Handler of an HTTP machine translation service.
@@ -80,7 +80,18 @@ public:
* @param[in] key Key to verify.
*/
virtual std::string getKeyVerificationURL(
- const std::string &key) const = 0;
+ const LLSD &key) const = 0;
+
+ /**
+ * Check API verification response.
+ *
+ * @param[out] bool true if valid.
+ * @param[in] response
+ * @param[in] status
+ */
+ virtual bool checkVerificationResponse(
+ const LLSD &response,
+ int status) const = 0;
/**
* Parse translation response.
@@ -92,6 +103,7 @@ public:
* @param[out] err_msg Error message (in case of error).
*/
virtual bool parseResponse(
+ const LLSD& http_response,
int& status,
const std::string& body,
std::string& translation,
@@ -105,14 +117,28 @@ public:
virtual LLTranslate::EService getCurrentService() = 0;
- virtual void verifyKey(const std::string &key, LLTranslate::KeyVerificationResult_fn fnc) = 0;
+ virtual void verifyKey(const LLSD &key, LLTranslate::KeyVerificationResult_fn fnc) = 0;
virtual void translateMessage(LanguagePair_t fromTo, std::string msg, LLTranslate::TranslationSuccess_fn success, LLTranslate::TranslationFailure_fn failure);
virtual ~LLTranslationAPIHandler() {}
- void verifyKeyCoro(LLTranslate::EService service, std::string key, LLTranslate::KeyVerificationResult_fn fnc);
+ void verifyKeyCoro(LLTranslate::EService service, LLSD key, LLTranslate::KeyVerificationResult_fn fnc);
void translateMessageCoro(LanguagePair_t fromTo, std::string msg, LLTranslate::TranslationSuccess_fn success, LLTranslate::TranslationFailure_fn failure);
+
+ virtual void initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent) const = 0;
+ virtual void initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent, const LLSD &key) const = 0;
+ virtual LLSD sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url,
+ const std::string & msg) const = 0;
+ virtual LLSD verifyAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url) const = 0;
};
void LLTranslationAPIHandler::translateMessage(LanguagePair_t fromTo, std::string msg, LLTranslate::TranslationSuccess_fn success, LLTranslate::TranslationFailure_fn failure)
@@ -122,8 +148,7 @@ void LLTranslationAPIHandler::translateMessage(LanguagePair_t fromTo, std::strin
}
-
-void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, std::string key, LLTranslate::KeyVerificationResult_fn fnc)
+void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD key, LLTranslate::KeyVerificationResult_fn fnc)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -140,8 +165,7 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, std::
LLVersionInfo::instance().getPatch(),
LLVersionInfo::instance().getBuild());
- httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
- httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
+ initHttpHeader(httpHeaders, user_agent, key);
httpOpts->setFollowRedirects(true);
httpOpts->setSSLVerifyPeer(false);
@@ -153,17 +177,29 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, std::
return;
}
- LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts, httpHeaders);
+ std::string::size_type delim_pos = url.find("://");
+ if (delim_pos == std::string::npos)
+ {
+ LL_INFOS("Translate") << "URL is missing a scheme" << LL_ENDL;
+ return;
+ }
+
+ LLSD result = verifyAndSuspend(httpAdapter, httpRequest, httpOpts, httpHeaders, url);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
bool bOk = true;
- if (!status)
+ int parseResult = status.getType();
+ if (!checkVerificationResponse(httpResults, parseResult))
+ {
bOk = false;
+ }
if (!fnc.empty())
- fnc(service, bOk);
+ {
+ fnc(service, bOk, parseResult);
+ }
}
void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::string msg,
@@ -184,8 +220,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
LLVersionInfo::instance().getPatch(),
LLVersionInfo::instance().getBuild());
- httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
- httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
+ initHttpHeader(httpHeaders, user_agent);
httpOpts->setSSLVerifyPeer(false);
std::string url = this->getTranslateURL(fromTo.first, fromTo.second, msg);
@@ -195,7 +230,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
return;
}
- LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts, httpHeaders);
+ LLSD result = sendMessageAndSuspend(httpAdapter, httpRequest, httpOpts, httpHeaders, url, msg);
if (LLApp::isQuitting())
{
@@ -216,7 +251,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
try
{
- res = this->parseResponse(parseResult, body, translation, detected_lang, err_msg);
+ res = this->parseResponse(httpResults, parseResult, body, translation, detected_lang, err_msg);
}
catch (std::out_of_range&)
{
@@ -242,6 +277,11 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
}
else
{
+ if (err_msg.empty() && httpResults.has("error_body"))
+ {
+ err_msg = httpResults["error_body"].asString();
+ }
+
if (err_msg.empty())
{
err_msg = LLTrans::getString("TranslationResponseParseError");
@@ -262,23 +302,42 @@ class LLGoogleTranslationHandler : public LLTranslationAPIHandler
LOG_CLASS(LLGoogleTranslationHandler);
public:
- /*virtual*/ std::string getTranslateURL(
+ std::string getTranslateURL(
const std::string &from_lang,
const std::string &to_lang,
- const std::string &text) const;
- /*virtual*/ std::string getKeyVerificationURL(
- const std::string &key) const;
- /*virtual*/ bool parseResponse(
+ const std::string &text) const override;
+ std::string getKeyVerificationURL(
+ const LLSD &key) const override;
+ bool checkVerificationResponse(
+ const LLSD &response,
+ int status) const override;
+ bool parseResponse(
+ const LLSD& http_response,
int& status,
const std::string& body,
std::string& translation,
std::string& detected_lang,
- std::string& err_msg) const;
- /*virtual*/ bool isConfigured() const;
+ std::string& err_msg) const override;
+ bool isConfigured() const override;
- /*virtual*/ LLTranslate::EService getCurrentService() { return LLTranslate::EService::SERVICE_GOOGLE; }
+ LLTranslate::EService getCurrentService() override { return LLTranslate::EService::SERVICE_GOOGLE; }
- /*virtual*/ void verifyKey(const std::string &key, LLTranslate::KeyVerificationResult_fn fnc);
+ void verifyKey(const LLSD &key, LLTranslate::KeyVerificationResult_fn fnc) override;
+
+ void initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent) const override;
+ void initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent, const LLSD &key) const override;
+ LLSD sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url,
+ const std::string & msg) const override;
+
+ LLSD verifyAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url) const override;
private:
static void parseErrorResponse(
@@ -311,15 +370,24 @@ std::string LLGoogleTranslationHandler::getTranslateURL(
// virtual
std::string LLGoogleTranslationHandler::getKeyVerificationURL(
- const std::string& key) const
+ const LLSD& key) const
{
- std::string url = std::string("https://www.googleapis.com/language/translate/v2/languages?key=")
- + key + "&target=en";
+ std::string url = std::string("https://www.googleapis.com/language/translate/v2/languages?key=")
+ + key.asString() +"&target=en";
return url;
}
+//virtual
+bool LLGoogleTranslationHandler::checkVerificationResponse(
+ const LLSD &response,
+ int status) const
+{
+ return status == HTTP_OK;
+}
+
// virtual
bool LLGoogleTranslationHandler::parseResponse(
+ const LLSD& http_response,
int& status,
const std::string& body,
std::string& translation,
@@ -407,75 +475,192 @@ bool LLGoogleTranslationHandler::parseTranslation(
// static
std::string LLGoogleTranslationHandler::getAPIKey()
{
- return gSavedSettings.getString("GoogleTranslateAPIKey");
+ static LLCachedControl<std::string> google_key(gSavedSettings, "GoogleTranslateAPIKey");
+ return google_key;
}
/*virtual*/
-void LLGoogleTranslationHandler::verifyKey(const std::string &key, LLTranslate::KeyVerificationResult_fn fnc)
+void LLGoogleTranslationHandler::verifyKey(const LLSD &key, LLTranslate::KeyVerificationResult_fn fnc)
{
LLCoros::instance().launch("Google /Verify Key", boost::bind(&LLTranslationAPIHandler::verifyKeyCoro,
this, LLTranslate::SERVICE_GOOGLE, key, fnc));
}
+/*virtual*/
+void LLGoogleTranslationHandler::initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent) const
+{
+ headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
+ headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
+}
+
+/*virtual*/
+void LLGoogleTranslationHandler::initHttpHeader(
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string& user_agent,
+ const LLSD &key) const
+{
+ headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
+ headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
+}
+
+LLSD LLGoogleTranslationHandler::sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url,
+ const std::string & msg) const
+{
+ return adapter->getRawAndSuspend(request, url, options, headers);
+}
+
+LLSD LLGoogleTranslationHandler::verifyAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url) const
+{
+ return adapter->getAndSuspend(request, url, options, headers);
+}
//=========================================================================
/// Microsoft Translator v2 API handler.
-class LLBingTranslationHandler : public LLTranslationAPIHandler
+class LLAzureTranslationHandler : public LLTranslationAPIHandler
{
- LOG_CLASS(LLBingTranslationHandler);
+ LOG_CLASS(LLAzureTranslationHandler);
public:
- /*virtual*/ std::string getTranslateURL(
+ std::string getTranslateURL(
const std::string &from_lang,
const std::string &to_lang,
- const std::string &text) const;
- /*virtual*/ std::string getKeyVerificationURL(
- const std::string &key) const;
- /*virtual*/ bool parseResponse(
+ const std::string &text) const override;
+ std::string getKeyVerificationURL(
+ const LLSD &key) const override;
+ bool checkVerificationResponse(
+ const LLSD &response,
+ int status) const override;
+ bool parseResponse(
+ const LLSD& http_response,
int& status,
const std::string& body,
std::string& translation,
std::string& detected_lang,
- std::string& err_msg) const;
- /*virtual*/ bool isConfigured() const;
-
- /*virtual*/ LLTranslate::EService getCurrentService() { return LLTranslate::EService::SERVICE_BING; }
-
- /*virtual*/ void verifyKey(const std::string &key, LLTranslate::KeyVerificationResult_fn fnc);
+ std::string& err_msg) const override;
+ bool isConfigured() const override;
+
+ LLTranslate::EService getCurrentService() override { return LLTranslate::EService::SERVICE_AZURE; }
+
+ void verifyKey(const LLSD &key, LLTranslate::KeyVerificationResult_fn fnc) override;
+
+ void initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent) const override;
+ void initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent, const LLSD &key) const override;
+ LLSD sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url,
+ const std::string & msg) const override;
+
+ LLSD verifyAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url) const override;
private:
- static std::string getAPIKey();
+ static std::string parseErrorResponse(
+ const std::string& body);
+ static LLSD getAPIKey();
static std::string getAPILanguageCode(const std::string& lang);
};
//-------------------------------------------------------------------------
// virtual
-std::string LLBingTranslationHandler::getTranslateURL(
+std::string LLAzureTranslationHandler::getTranslateURL(
const std::string &from_lang,
const std::string &to_lang,
const std::string &text) const
{
- std::string url = std::string("http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=")
- + getAPIKey() + "&text=" + LLURI::escape(text) + "&to=" + getAPILanguageCode(to_lang);
- if (!from_lang.empty())
- {
- url += "&from=" + getAPILanguageCode(from_lang);
- }
+ std::string url;
+ LLSD key = getAPIKey();
+ if (key.isMap())
+ {
+ std::string endpoint = key["endpoint"].asString();
+
+ if (*endpoint.rbegin() != '/')
+ {
+ endpoint += "/";
+ }
+ url = endpoint + std::string("translate?api-version=3.0&to=")
+ + getAPILanguageCode(to_lang);
+ }
return url;
}
// virtual
-std::string LLBingTranslationHandler::getKeyVerificationURL(
- const std::string& key) const
+std::string LLAzureTranslationHandler::getKeyVerificationURL(
+ const LLSD& key) const
{
- std::string url = std::string("http://api.microsofttranslator.com/v2/Http.svc/GetLanguagesForTranslate?appId=")
- + key;
+ std::string url;
+ if (key.isMap())
+ {
+ std::string endpoint = key["endpoint"].asString();
+ if (*endpoint.rbegin() != '/')
+ {
+ endpoint += "/";
+ }
+ url = endpoint + std::string("translate?api-version=3.0&to=en");
+ }
return url;
}
+//virtual
+bool LLAzureTranslationHandler::checkVerificationResponse(
+ const LLSD &response,
+ int status) const
+{
+ if (status == HTTP_UNAUTHORIZED)
+ {
+ LL_DEBUGS("Translate") << "Key unathorised" << LL_ENDL;
+ return false;
+ }
+
+ if (status == HTTP_NOT_FOUND)
+ {
+ LL_DEBUGS("Translate") << "Either endpoint doesn't have requested resource" << LL_ENDL;
+ return false;
+ }
+
+ if (status != HTTP_BAD_REQUEST)
+ {
+ LL_DEBUGS("Translate") << "Unexpected error code" << LL_ENDL;
+ return false;
+ }
+
+ if (!response.has("error_body"))
+ {
+ LL_DEBUGS("Translate") << "Unexpected response, no error returned" << LL_ENDL;
+ return false;
+ }
+
+ // Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}"
+ // But for now just verify response is a valid json
+
+ Json::Value root;
+ Json::Reader reader;
+
+ if (!reader.parse(response["error_body"].asString(), root))
+ {
+ LL_DEBUGS("Translate") << "Failed to parse error_body:" << reader.getFormatedErrorMessages() << LL_ENDL;
+ return false;
+ }
+
+ return true;
+}
+
// virtual
-bool LLBingTranslationHandler::parseResponse(
+bool LLAzureTranslationHandler::parseResponse(
+ const LLSD& http_response,
int& status,
const std::string& body,
std::string& translation,
@@ -484,65 +669,173 @@ bool LLBingTranslationHandler::parseResponse(
{
if (status != HTTP_OK)
{
- static const std::string MSG_BEGIN_MARKER = "Message: ";
- size_t begin = body.find(MSG_BEGIN_MARKER);
- if (begin != std::string::npos)
- {
- begin += MSG_BEGIN_MARKER.size();
- }
- else
- {
- begin = 0;
- err_msg.clear();
- }
- size_t end = body.find("</p>", begin);
- err_msg = body.substr(begin, end-begin);
- LLStringUtil::replaceString(err_msg, "&#xD;", ""); // strip CR
+ if (http_response.has("error_body"))
+ err_msg = parseErrorResponse(http_response["error_body"].asString());
return false;
}
- // Sample response: <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Hola</string>
- size_t begin = body.find(">");
- if (begin == std::string::npos || begin >= (body.size() - 1))
- {
- begin = 0;
- }
- else
- {
- ++begin;
- }
+ //Example:
+ // "[{\"detectedLanguage\":{\"language\":\"en\",\"score\":1.0},\"translations\":[{\"text\":\"Hello, what is your name?\",\"to\":\"en\"}]}]"
- size_t end = body.find("</string>", begin);
+ Json::Value root;
+ Json::Reader reader;
- detected_lang = ""; // unsupported by this API
- translation = body.substr(begin, end-begin);
- LLStringUtil::replaceString(translation, "&#xD;", ""); // strip CR
- return true;
+ if (!reader.parse(body, root))
+ {
+ err_msg = reader.getFormatedErrorMessages();
+ return false;
+ }
+
+ if (!root.isArray()) // empty response? should not happen
+ {
+ return false;
+ }
+
+ // Request succeeded, extract translation from the response.
+
+ const Json::Value& data = root[0U];
+ if (!data.isObject()
+ || !data.isMember("detectedLanguage")
+ || !data.isMember("translations"))
+ {
+ return false;
+ }
+
+ const Json::Value& detectedLanguage = data["detectedLanguage"];
+ if (!detectedLanguage.isObject() || !detectedLanguage.isMember("language"))
+ {
+ return false;
+ }
+ detected_lang = detectedLanguage["language"].asString();
+
+ const Json::Value& translations = data["translations"];
+ if (!translations.isArray() || translations.size() == 0)
+ {
+ return false;
+ }
+
+ const Json::Value& first = translations[0U];
+ if (!first.isObject() || !first.isMember("text"))
+ {
+ return false;
+ }
+
+ translation = first["text"].asString();
+
+ return true;
}
// virtual
-bool LLBingTranslationHandler::isConfigured() const
+bool LLAzureTranslationHandler::isConfigured() const
{
- return !getAPIKey().empty();
+ return !getAPIKey().isMap();
+}
+
+//static
+std::string LLAzureTranslationHandler::parseErrorResponse(
+ const std::string& body)
+{
+ // Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}"
+ // But for now just verify response is a valid json with an error
+
+ Json::Value root;
+ Json::Reader reader;
+
+ if (!reader.parse(body, root))
+ {
+ return std::string();
+ }
+
+ if (!root.isObject() || !root.isMember("error"))
+ {
+ return std::string();
+ }
+
+ const Json::Value& error_map = root["error"];
+
+ if (!error_map.isObject() || !error_map.isMember("message"))
+ {
+ return std::string();
+ }
+
+ return error_map["message"].asString();
}
// static
-std::string LLBingTranslationHandler::getAPIKey()
+LLSD LLAzureTranslationHandler::getAPIKey()
{
- return gSavedSettings.getString("BingTranslateAPIKey");
+ static LLCachedControl<LLSD> azure_key(gSavedSettings, "AzureTranslateAPIKey");
+ return azure_key;
}
// static
-std::string LLBingTranslationHandler::getAPILanguageCode(const std::string& lang)
+std::string LLAzureTranslationHandler::getAPILanguageCode(const std::string& lang)
{
return lang == "zh" ? "zh-CHT" : lang; // treat Chinese as Traditional Chinese
}
/*virtual*/
-void LLBingTranslationHandler::verifyKey(const std::string &key, LLTranslate::KeyVerificationResult_fn fnc)
+void LLAzureTranslationHandler::verifyKey(const LLSD &key, LLTranslate::KeyVerificationResult_fn fnc)
+{
+ LLCoros::instance().launch("Azure /Verify Key", boost::bind(&LLTranslationAPIHandler::verifyKeyCoro,
+ this, LLTranslate::SERVICE_AZURE, key, fnc));
+}
+/*virtual*/
+void LLAzureTranslationHandler::initHttpHeader(
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string& user_agent) const
+{
+ initHttpHeader(headers, user_agent, getAPIKey());
+}
+
+/*virtual*/
+void LLAzureTranslationHandler::initHttpHeader(
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string& user_agent,
+ const LLSD &key) const
+{
+ headers->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_JSON);
+ headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
+
+ if (key.has("id"))
+ {
+ // Token based autorization
+ headers->append("Ocp-Apim-Subscription-Key", key["id"].asString());
+ }
+ if (key.has("region"))
+ {
+ // ex: "westeurope"
+ headers->append("Ocp-Apim-Subscription-Region", key["region"].asString());
+ }
+}
+
+LLSD LLAzureTranslationHandler::sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url,
+ const std::string & msg) const
{
- LLCoros::instance().launch("Bing /Verify Key", boost::bind(&LLTranslationAPIHandler::verifyKeyCoro,
- this, LLTranslate::SERVICE_BING, key, fnc));
+ LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray);
+ LLCore::BufferArrayStream outs(rawbody.get());
+ outs << "[{\"text\":\"";
+ outs << msg;
+ outs << "\"}]";
+
+ return adapter->postRawAndSuspend(request, url, rawbody, options, headers);
+}
+
+LLSD LLAzureTranslationHandler::verifyAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
+ LLCore::HttpRequest::ptr_t request,
+ LLCore::HttpOptions::ptr_t options,
+ LLCore::HttpHeaders::ptr_t headers,
+ const std::string & url) const
+{
+ LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray);
+ LLCore::BufferArrayStream outs(rawbody.get());
+ outs << "[{\"intentionally_invalid_400\"}]";
+
+ return adapter->postRawAndSuspend(request, url, rawbody, options, headers);
}
//=========================================================================
@@ -569,58 +862,69 @@ void LLTranslate::translateMessage(const std::string &from_lang, const std::stri
std::string LLTranslate::addNoTranslateTags(std::string mesg)
{
- if (getPreferredHandler().getCurrentService() != SERVICE_BING)
+ if (getPreferredHandler().getCurrentService() == SERVICE_GOOGLE)
{
return mesg;
}
- std::string upd_msg(mesg);
- LLUrlMatch match;
- S32 dif = 0;
- //surround all links (including SLURLs) with 'no-translate' tags to prevent unnecessary translation
- while (LLUrlRegistry::instance().findUrl(mesg, match))
+ if (getPreferredHandler().getCurrentService() == SERVICE_AZURE)
{
- upd_msg.insert(dif + match.getStart(), BING_NOTRANSLATE_OPENING_TAG);
- upd_msg.insert(dif + BING_NOTRANSLATE_OPENING_TAG.size() + match.getEnd() + 1, BING_NOTRANSLATE_CLOSING_TAG);
- mesg.erase(match.getStart(), match.getEnd() - match.getStart());
- dif += match.getEnd() - match.getStart() + BING_NOTRANSLATE_OPENING_TAG.size() + BING_NOTRANSLATE_CLOSING_TAG.size();
+ // https://learn.microsoft.com/en-us/azure/cognitive-services/translator/prevent-translation
+ std::string upd_msg(mesg);
+ LLUrlMatch match;
+ S32 dif = 0;
+ //surround all links (including SLURLs) with 'no-translate' tags to prevent unnecessary translation
+ while (LLUrlRegistry::instance().findUrl(mesg, match))
+ {
+ upd_msg.insert(dif + match.getStart(), AZURE_NOTRANSLATE_OPENING_TAG);
+ upd_msg.insert(dif + AZURE_NOTRANSLATE_OPENING_TAG.size() + match.getEnd() + 1, AZURE_NOTRANSLATE_CLOSING_TAG);
+ mesg.erase(match.getStart(), match.getEnd() - match.getStart());
+ dif += match.getEnd() - match.getStart() + AZURE_NOTRANSLATE_OPENING_TAG.size() + AZURE_NOTRANSLATE_CLOSING_TAG.size();
+ }
+ return upd_msg;
}
- return upd_msg;
+ return mesg;
}
std::string LLTranslate::removeNoTranslateTags(std::string mesg)
{
- if (getPreferredHandler().getCurrentService() != SERVICE_BING)
+ if (getPreferredHandler().getCurrentService() == SERVICE_GOOGLE)
{
return mesg;
}
- std::string upd_msg(mesg);
- LLUrlMatch match;
- S32 opening_tag_size = BING_NOTRANSLATE_OPENING_TAG.size();
- S32 closing_tag_size = BING_NOTRANSLATE_CLOSING_TAG.size();
- S32 dif = 0;
- //remove 'no-translate' tags we added to the links before
- while (LLUrlRegistry::instance().findUrl(mesg, match))
+
+ if (getPreferredHandler().getCurrentService() == SERVICE_AZURE)
{
- if (upd_msg.substr(dif + match.getStart() - opening_tag_size, opening_tag_size) == BING_NOTRANSLATE_OPENING_TAG)
+ std::string upd_msg(mesg);
+ LLUrlMatch match;
+ S32 opening_tag_size = AZURE_NOTRANSLATE_OPENING_TAG.size();
+ S32 closing_tag_size = AZURE_NOTRANSLATE_CLOSING_TAG.size();
+ S32 dif = 0;
+ //remove 'no-translate' tags we added to the links before
+ while (LLUrlRegistry::instance().findUrl(mesg, match))
{
- upd_msg.erase(dif + match.getStart() - opening_tag_size, opening_tag_size);
- dif -= opening_tag_size;
-
- if (upd_msg.substr(dif + match.getEnd() + 1, closing_tag_size) == BING_NOTRANSLATE_CLOSING_TAG)
+ if (upd_msg.substr(dif + match.getStart() - opening_tag_size, opening_tag_size) == AZURE_NOTRANSLATE_OPENING_TAG)
{
- upd_msg.replace(dif + match.getEnd() + 1, closing_tag_size, " ");
- dif -= closing_tag_size - 1;
+ upd_msg.erase(dif + match.getStart() - opening_tag_size, opening_tag_size);
+ dif -= opening_tag_size;
+
+ if (upd_msg.substr(dif + match.getEnd() + 1, closing_tag_size) == AZURE_NOTRANSLATE_CLOSING_TAG)
+ {
+ upd_msg.replace(dif + match.getEnd() + 1, closing_tag_size, " ");
+ dif -= closing_tag_size - 1;
+ }
}
+ mesg.erase(match.getStart(), match.getUrl().size());
+ dif += match.getUrl().size();
}
- mesg.erase(match.getStart(), match.getUrl().size());
- dif += match.getUrl().size();
+ return upd_msg;
}
- return upd_msg;
+
+ return mesg;
}
/*static*/
-void LLTranslate::verifyKey(EService service, const std::string &key, KeyVerificationResult_fn fnc)
+void LLTranslate::verifyKey(EService service, const LLSD &key, KeyVerificationResult_fn fnc)
{
LLTranslationAPIHandler& handler = getHandler(service);
@@ -686,7 +990,7 @@ LLSD LLTranslate::asLLSD() const
// static
LLTranslationAPIHandler& LLTranslate::getPreferredHandler()
{
- EService service = SERVICE_BING;
+ EService service = SERVICE_AZURE;
std::string service_str = gSavedSettings.getString("TranslationService");
if (service_str == "google")
@@ -701,12 +1005,12 @@ LLTranslationAPIHandler& LLTranslate::getPreferredHandler()
LLTranslationAPIHandler& LLTranslate::getHandler(EService service)
{
static LLGoogleTranslationHandler google;
- static LLBingTranslationHandler bing;
+ static LLAzureTranslationHandler azure;
if (service == SERVICE_GOOGLE)
{
return google;
}
- return bing;
+ return azure;
}
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index 58707e2d36..ffbbb05e62 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -59,11 +59,11 @@ class LLTranslate: public LLSingleton<LLTranslate>
public :
typedef enum e_service {
- SERVICE_BING,
+ SERVICE_AZURE,
SERVICE_GOOGLE,
} EService;
- typedef boost::function<void(EService, bool)> KeyVerificationResult_fn;
+ typedef boost::function<void(EService, bool, S32)> KeyVerificationResult_fn;
typedef boost::function<void(std::string , std::string )> TranslationSuccess_fn;
typedef boost::function<void(int, std::string)> TranslationFailure_fn;
@@ -78,12 +78,12 @@ public :
static void translateMessage(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, TranslationSuccess_fn success, TranslationFailure_fn failure);
/**
- * Verify given API key of a translation service.
- *
- * @param receiver Object to pass verification result to.
- * @param key Key to verify.
- */
- static void verifyKey(EService service, const std::string &key, KeyVerificationResult_fn fnc);
+ * Verify given API key of a translation service.
+ *
+ * @param receiver Object to pass verification result to.
+ * @param key Key to verify.
+ */
+ static void verifyKey(EService service, const LLSD &key, KeyVerificationResult_fn fnc);
/**
* @return translation target language
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 998f5c020e..ffa4fc73c2 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -276,10 +276,6 @@ void handle_object_owner_permissive(void*);
void handle_object_lock(void*);
void handle_object_asset_ids(void*);
void force_take_copy(void*);
-#ifdef _CORY_TESTING
-void force_export_copy(void*);
-void force_import_geometry(void*);
-#endif
void handle_force_parcel_owner_to_me(void*);
void handle_force_parcel_to_content(void*);
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index fdf1d04c09..f9ec1115a6 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -277,9 +277,6 @@ void LLMediaFilePicker::notify(const std::vector<std::string>& filenames)
static std::string SOUND_EXTENSIONS = "wav";
static std::string IMAGE_EXTENSIONS = "tga bmp jpg jpeg png";
static std::string ANIM_EXTENSIONS = "bvh anim";
-#ifdef _CORY_TESTING
-static std::string GEOMETRY_EXTENSIONS = "slg";
-#endif
static std::string XML_EXTENSIONS = "xml";
static std::string SLOBJECT_EXTENSIONS = "slobject";
#endif
@@ -301,10 +298,6 @@ std::string build_extensions_string(LLFilePicker::ELoadFilter filter)
return SLOBJECT_EXTENSIONS;
case LLFilePicker::FFLOAD_MODEL:
return MODEL_EXTENSIONS;
-#ifdef _CORY_TESTING
- case LLFilePicker::FFLOAD_GEOMETRY:
- return GEOMETRY_EXTENSIONS;
-#endif
case LLFilePicker::FFLOAD_XML:
return XML_EXTENSIONS;
case LLFilePicker::FFLOAD_ALL:
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 8a11c5cf8f..c458c75a40 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -402,9 +402,6 @@ void LLViewerTextureManager::init()
LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER);
- LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- LLViewerFetchedTexture::sSmokeImagep->setNoDelete();
-
image_raw = new LLImageRaw(32,32,3);
data = image_raw->getData();
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 0a20c864dd..e6d4b0d026 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -228,6 +228,8 @@ void LLViewerTextureList::doPrefetchImages()
LLViewerTextureManager::getFetchedTexture(IMG_SHOT);
LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF);
+ LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ LLViewerFetchedTexture::sSmokeImagep->setNoDelete();
LLStandardBumpmap::addstandard();
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index c73f96da2d..3725510b6a 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -276,13 +276,13 @@ static void killGateway()
///////////////////////////////////////////////////////////////////////////////////////////////
bool LLVivoxVoiceClient::sShuttingDown = false;
+bool LLVivoxVoiceClient::sConnected = false;
+LLPumpIO *LLVivoxVoiceClient::sPump = nullptr;
LLVivoxVoiceClient::LLVivoxVoiceClient() :
mSessionTerminateRequested(false),
mRelogRequested(false),
- mConnected(false),
mTerminateDaemon(false),
- mPump(NULL),
mSpatialJoiningNum(0),
mTuningMode(false),
@@ -350,7 +350,11 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
mIsProcessingChannels(false),
mIsCoroutineActive(false),
mVivoxPump("vivoxClientPump")
-{
+{
+ sShuttingDown = false;
+ sConnected = false;
+ sPump = nullptr;
+
mSpeakerVolume = scale_speaker_volume(0);
mVoiceVersion.serverVersion = "";
@@ -392,7 +396,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient()
void LLVivoxVoiceClient::init(LLPumpIO *pump)
{
// constructor will set up LLVoiceClient::getInstance()
- mPump = pump;
+ sPump = pump;
// LLCoros::instance().launch("LLVivoxVoiceClient::voiceControlCoro",
// boost::bind(&LLVivoxVoiceClient::voiceControlCoro, LLVivoxVoiceClient::getInstance()));
@@ -413,10 +417,10 @@ void LLVivoxVoiceClient::terminate()
logoutOfVivox(false);
}
- if(mConnected)
+ if(sConnected)
{
breakVoiceConnection(false);
- mConnected = false;
+ sConnected = false;
}
else
{
@@ -425,7 +429,7 @@ void LLVivoxVoiceClient::terminate()
}
sShuttingDown = true;
- mPump = NULL;
+ sPump = NULL;
}
//---------------------------------------------------
@@ -471,7 +475,7 @@ bool LLVivoxVoiceClient::writeString(const std::string &str)
bool result = false;
LL_DEBUGS("LowVoice") << "sending:\n" << str << LL_ENDL;
- if(mConnected)
+ if(sConnected)
{
apr_status_t err;
apr_size_t size = (apr_size_t)str.size();
@@ -1051,7 +1055,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
int retryCount(0);
LLVoiceVivoxStats::getInstance()->reset();
- while (!mConnected && !sShuttingDown && retryCount++ <= DAEMON_CONNECT_RETRY_MAX)
+ while (!sConnected && !sShuttingDown && retryCount++ <= DAEMON_CONNECT_RETRY_MAX)
{
LLVoiceVivoxStats::getInstance()->connectionAttemptStart();
LL_DEBUGS("Voice") << "Attempting to connect to vivox daemon: " << mDaemonHost << LL_ENDL;
@@ -1061,23 +1065,23 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP);
}
- mConnected = mSocket->blockingConnect(mDaemonHost);
- LLVoiceVivoxStats::getInstance()->connectionAttemptEnd(mConnected);
- if (!mConnected)
+ sConnected = mSocket->blockingConnect(mDaemonHost);
+ LLVoiceVivoxStats::getInstance()->connectionAttemptEnd(sConnected);
+ if (!sConnected)
{
llcoro::suspendUntilTimeout(DAEMON_CONNECT_THROTTLE_SECONDS);
}
}
//---------------------------------------------------------------------
- if (sShuttingDown && !mConnected)
+ if (sShuttingDown && !sConnected)
{
return false;
}
llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS);
- while (!mPump && !sShuttingDown)
+ while (!sPump && !sShuttingDown)
{ // Can't use the pump until we have it available.
llcoro::suspend();
}
@@ -1099,7 +1103,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
readChain.push_back(LLIOPipe::ptr_t(new LLVivoxProtocolParser()));
- mPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS);
+ sPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS);
//---------------------------------------------------------------------
@@ -1321,9 +1325,9 @@ bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait)
// the message, yet we need to receive "connector shutdown response".
// Either wait a bit and emulate it or check gMessageSystem for specific message
_sleep(1000);
- if (mConnected)
+ if (sConnected)
{
- mConnected = false;
+ sConnected = false;
LLSD vivoxevent(LLSDMap("connector", LLSD::Boolean(false)));
mVivoxPump.post(vivoxevent);
}
@@ -1335,7 +1339,7 @@ bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait)
LL_DEBUGS("Voice") << "closing SLVoice socket" << LL_ENDL;
closeSocket(); // Need to do this now -- bad things happen if the destructor does it later.
cleanUp();
- mConnected = false;
+ sConnected = false;
return retval;
}
@@ -2516,7 +2520,7 @@ bool LLVivoxVoiceClient::performMicTuning()
void LLVivoxVoiceClient::closeSocket(void)
{
mSocket.reset();
- mConnected = false;
+ sConnected = false;
mConnectorEstablished = false;
mAccountLoggedIn = false;
}
@@ -3017,7 +3021,7 @@ bool LLVivoxVoiceClient::deviceSettingsAvailable()
{
bool result = true;
- if(!mConnected)
+ if(!sConnected)
result = false;
if(mRenderDevices.empty())
@@ -3816,7 +3820,7 @@ void LLVivoxVoiceClient::connectorShutdownResponse(int statusCode, std::string &
// Should this ever fail? do we care if it does?
}
- mConnected = false;
+ sConnected = false;
mShutdownComplete = true;
LLSD vivoxevent(LLSDMap("connector", LLSD::Boolean(false)));
@@ -7389,7 +7393,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
LL_DEBUGS("VivoxProtocolParser") << "at end, mInput is: " << mInput << LL_ENDL;
- if(!LLVivoxVoiceClient::getInstance()->mConnected)
+ if(!LLVivoxVoiceClient::sConnected)
{
// If voice has been disabled, we just want to close the socket. This does so.
LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL;
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 0a785401c1..e3ab99c675 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -666,12 +666,10 @@ private:
LLHost mDaemonHost;
LLSocket::ptr_t mSocket;
- bool mConnected;
// We should kill the voice daemon in case of connection alert
bool mTerminateDaemon;
- LLPumpIO *mPump;
friend class LLVivoxProtocolParser;
std::string mAccountName;
@@ -916,7 +914,10 @@ private:
bool mIsProcessingChannels;
bool mIsCoroutineActive;
- static bool sShuttingDown; // corutines can last longer than vivox so we need a static variable as a shutdown flag
+ // This variables can last longer than vivox in coroutines so we need them as static
+ static bool sShuttingDown;
+ static bool sConnected;
+ static LLPumpIO* sPump;
LLEventMailDrop mVivoxPump;
};
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 51925b4129..7a73ee1339 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5296,13 +5296,14 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
if (mat)
{
+ BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
if (type == LLRenderPass::PASS_ALPHA)
{
- shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND);
+ shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
}
else
{
- shader_mask = mat->getShaderMask();
+ shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT, is_alpha);
}
}
@@ -5857,15 +5858,18 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
else
{
- if (te->getColor().mV[3] > 0.f || te->getGlow() > 0.f)
- { //only treat as alpha in the pipeline if < 100% transparent
- drawablep->setState(LLDrawable::HAS_ALPHA);
- add_face(sAlphaFaces, alpha_count, facep);
- }
- else if (LLDrawPoolAlpha::sShowDebugAlpha)
- {
- add_face(sAlphaFaces, alpha_count, facep);
- }
+ if (te->getColor().mV[3] > 0.f || te->getGlow() > 0.f)
+ { //only treat as alpha in the pipeline if < 100% transparent
+ drawablep->setState(LLDrawable::HAS_ALPHA);
+ add_face(sAlphaFaces, alpha_count, facep);
+ }
+ else if (LLDrawPoolAlpha::sShowDebugAlpha ||
+ (gPipeline.sRenderHighlight &&
+ (LLPipeline::getRenderScriptedBeacons() || LLPipeline::getRenderScriptedTouchBeacons()) &&
+ drawablep->getVObj() && drawablep->getVObj()->flagScripted()))
+ { //draw the transparent face for debugging purposes using a custom texture
+ add_face(sAlphaFaces, alpha_count, facep);
+ }
}
}
else
@@ -6692,7 +6696,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
LLRenderPass::PASS_NORMSPEC_EMISSIVE,
};
- U32 mask = mat->getShaderMask();
+ U32 mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT, is_alpha);
llassert(mask < sizeof(pass)/sizeof(U32));
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta.png b/indra/newview/skins/default/textures/icons/profile_badge_beta.png
new file mode 100644
index 0000000000..7c8a723c47
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/profile_badge_beta.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png
new file mode 100644
index 0000000000..7c38e9e2ae
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png
new file mode 100644
index 0000000000..475edd080e
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_linden.png b/indra/newview/skins/default/textures/icons/profile_badge_linden.png
new file mode 100644
index 0000000000..1b6ac03e86
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/profile_badge_linden.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png
new file mode 100644
index 0000000000..4286995202
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png
new file mode 100644
index 0000000000..47e93c4fac
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 72c8f03017..7d999a2ffa 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -511,7 +511,13 @@ with the same filename but different name
<texture name="Play_Off" file_name="icons/Play_Off.png" preload="false" />
<texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" />
<texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" />
-
+
+ <texture name="Profile_Badge_Beta" file_name="icons/profile_badge_beta.png" preload="true"/>
+ <texture name="Profile_Badge_Beta_Lifetime" file_name="icons/profile_badge_beta_lifetime.png" preload="true"/>
+ <texture name="Profile_Badge_Lifetime" file_name="icons/profile_badge_lifetime.png" preload="true"/>
+ <texture name="Profile_Badge_Linden" file_name="icons/profile_badge_linden.png" preload="true"/>
+ <texture name="Profile_Badge_Pplus_Lifetime" file_name="icons/profile_badge_pplus_lifetime.png" preload="true"/>
+ <texture name="Profile_Badge_Premium_Lifetime" file_name="icons/profile_badge_premium_lifetime.png" preload="true"/>
<texture name="Profile_Group_Visibility_Off" file_name="icons/profile_group_visibility_eye_off.png" preload="true"/>
<texture name="Profile_Group_Visibility_Off_Pressed" file_name="icons/profile_group_visibility_eye_off_pressed.png" preload="true"/>
<texture name="Profile_Group_Visibility_On" file_name="icons/profile_group_visibility_eye_on.png" preload="true"/>
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
index a212ce7889..dc3e072adf 100644
--- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- height="310"
+ height="370"
layout="topleft"
name="floater_translation_settings"
help_topic="translation_settings"
@@ -9,10 +9,10 @@
title="CHAT TRANSLATION SETTINGS"
width="485">
- <string name="bing_api_key_not_verified">Bing appID not verified. Please try again.</string>
- <string name="google_api_key_not_verified">Google API key not verified. Please try again.</string>
+ <string name="azure_api_key_not_verified">Azure service identifier not verified. Status: [STATUS]. Please check your settings and try again.</string>
+ <string name="google_api_key_not_verified">Google API key not verified. Status: [STATUS]. Please check your key and try again.</string>
- <string name="bing_api_key_verified">Bing appID verified.</string>
+ <string name="azure_api_key_verified">Azure service identifier verified.</string>
<string name="google_api_key_verified">Google API key verified.</string>
<check_box
@@ -128,25 +128,80 @@
<radio_group
follows="top|left"
- height="80"
+ height="140"
layout="topleft"
left_delta="10"
name="translation_service_rg"
top_pad="20"
width="320">
<radio_item
- initial_value="bing"
- label="Bing Translator"
+ initial_value="azure"
+ label="Azure Translator"
layout="topleft"
- name="bing" />
+ name="azure" />
<radio_item
initial_value="google"
label="Google Translate"
layout="topleft"
name="google"
- top_pad="55" />
+ top_pad="115" />
</radio_group>
+ <text
+ follows="top|right"
+ height="20"
+ layout="topleft"
+ left="185"
+ length="1"
+ name="google_links_text"
+ top_pad="-142"
+ type="string"
+ width="100">
+ [https://learn.microsoft.com/en-us/azure/cognitive-services/translator/create-translator-resource Setup]
+ </text>
+
+ <text
+ type="string"
+ length="1"
+ follows="top|right"
+ height="20"
+ layout="topleft"
+ left="70"
+ name="azure_api_endoint_label"
+ top_pad="8"
+ width="85">
+ Endpoint:
+ </text>
+
+ <combo_box
+ allow_text_entry="true"
+ follows="left|top"
+ name="azure_api_endpoint_combo"
+ height="23"
+ left_pad="10"
+ right="-10"
+ top_delta="-4"
+ max_chars="512"
+ value="https://api.cognitive.microsofttranslator.com"
+ combo_button.scale_image="true">
+ <combo_box.item
+ label="https://api.cognitive.microsofttranslator.com"
+ name="global"
+ value="https://api.cognitive.microsofttranslator.com" />
+ <combo_box.item
+ label="https://api-apc.cognitive.microsofttranslator.com"
+ name="api-apc"
+ value="https://api-apc.cognitive.microsofttranslator.com" />
+ <combo_box.item
+ label="https://api-eur.cognitive.microsofttranslator.com"
+ name="api-eur"
+ value="https://api-eur.cognitive.microsofttranslator.com" />
+ <combo_box.item
+ label="https://api-nam.cognitive.microsofttranslator.com"
+ name="api-nam"
+ value="https://api-nam.cognitive.microsofttranslator.com" />
+ </combo_box>
+
<text
type="string"
length="1"
@@ -154,30 +209,52 @@
height="20"
layout="topleft"
left="70"
- name="bing_api_key_label"
- top_pad="-55"
+ name="azure_api_key_label"
+ top_pad="10"
width="85">
- Bing [http://www.bing.com/developers/createapp.aspx AppID]:
+ Azure Key:
</text>
<line_editor
- default_text="Enter Bing AppID and click &quot;Verify&quot;"
+ default_text="Enter Translator Key and click &quot;Verify&quot;"
follows="top|left"
height="20"
layout="topleft"
left_pad="10"
max_length_chars="50"
top_delta="-4"
- name="bing_api_key"
+ name="azure_api_key"
width="210" />
- <button
- follows="left|top"
- height="23"
- label="Verify"
- layout="topleft"
- left_pad="10"
- name="verify_bing_api_key_btn"
- top_delta="-2"
- width="90" />
+ <text
+ type="string"
+ length="1"
+ follows="top|right"
+ height="20"
+ layout="topleft"
+ left="70"
+ name="azure_api_region_label"
+ top_pad="11"
+ width="85">
+ Region:
+ </text>
+ <line_editor
+ default_text="Can be left empty for global services"
+ follows="top|left"
+ height="20"
+ layout="topleft"
+ left_pad="10"
+ max_length_chars="50"
+ top_delta="-4"
+ name="azure_api_region"
+ width="210" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Verify"
+ layout="topleft"
+ left_pad="10"
+ name="verify_azure_api_key_btn"
+ top_delta="-2"
+ width="90" />
<text
follows="top|right"
@@ -186,7 +263,7 @@
left="70"
length="1"
name="google_api_key_label"
- top_pad="50"
+ top_pad="53"
type="string"
width="85">
Google [http://code.google.com/apis/language/translate/v2/getting_started.html#auth API key]:
diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
index 777b37d666..07cdd6d71e 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -27,6 +27,26 @@
Account: [ACCTTYPE]
[PAYMENTINFO]
</string>
+
+ <!--Badges-->
+ <string
+ name="BadgeBeta"
+ value="Original Beta Tester" />
+ <string
+ name="BadgeBetaLifetime"
+ value="Beta Lifetime member" />
+ <string
+ name="BadgeLifetime"
+ value="Lifetime member" />
+ <string
+ name="BadgeLinden"
+ value="Linden Lab employee" />
+ <string
+ name="BadgePremiumLifetime"
+ value="Premium lifetime" />
+ <string
+ name="BadgePremiumPlusLifetime"
+ value="Premium Plus lifetime" />
<layout_stack
name="image_stack"
@@ -156,9 +176,39 @@ Account: [ACCTTYPE]
user_resize="false"
visible="true">
</layout_panel>
-
+
+ <layout_panel
+ name="badge_layout"
+ follows="all"
+ layout="topleft"
+ height="40"
+ auto_resize="false"
+ user_resize="false"
+ visible="false">
+ <icon
+ name="badge_icon"
+ image_name="Beta_Tester"
+ layout="topleft"
+ follows="left|top"
+ top="10"
+ left="5"
+ height="18"
+ width="18"/>
+ <text
+ name="badge_text"
+ value="Badge Tester"
+ top="13"
+ left_pad="3"
+ right="-1"
+ height="16"
+ follows="left|top|right"
+ layout="topleft"
+ translate="false"
+ visible="true"/>
+ </layout_panel>
+
<layout_panel
- name="frind_layout"
+ name="friend_layout"
follows="all"
layout="topleft"
height="16"
@@ -166,7 +216,7 @@ Account: [ACCTTYPE]
user_resize="false"
visible="false">
<text
- name="frind_text"
+ name="friend_text"
value="You are friends"
text_color="ConversationFriendColor"
top="0"
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_hair.xml b/indra/newview/skins/default/xui/pt/panel_edit_hair.xml
index 13f1f892f9..e9750a1c2e 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_hair.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_hair.xml
@@ -7,7 +7,7 @@
<accordion name="wearable_accordion">
<accordion_tab name="hair_color_tab" title="Cor"/>
<accordion_tab name="hair_style_tab" title="Estilo"/>
- <accordion_tab name="hair_eyebrows_tab" title="Sombrancelhas"/>
+ <accordion_tab name="hair_eyebrows_tab" title="Sobrancelhas"/>
<accordion_tab name="hair_facial_tab" title="Faciais"/>
</accordion>
</panel>