From d9983255569eb5c49e8a414b4b8e8f56f9d33533 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 30 Nov 2018 17:29:54 +0200 Subject: [PATCH 01/13] SL-10145 Right clicking on unselected link in editor near selected text shows wrong menu --- indra/llui/lltexteditor.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 134b76c720..137167db2a 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -732,14 +732,30 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) { setFocus(TRUE); } + + bool show_menu = false; + // Prefer editor menu if it has selection. See EXT-6806. - if (hasSelection() || !LLTextBase::handleRightMouseDown(x, y, mask)) + if (hasSelection()) { - if(getShowContextMenu()) + S32 click_pos = getDocIndexFromLocalCoord(x, y, FALSE); + if (click_pos > mSelectionStart && click_pos < mSelectionEnd) { - showContextMenu(x, y); + show_menu = true; } } + + // Let segments handle the click, if nothing does, show editor menu + if (!show_menu && !LLTextBase::handleRightMouseDown(x, y, mask)) + { + show_menu = true; + } + + if (show_menu && getShowContextMenu()) + { + showContextMenu(x, y); + } + return TRUE; } From 095c7eb0af14b600b5d41a3f72414da399a003a3 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 3 Dec 2018 16:14:22 +0200 Subject: [PATCH 02/13] SL-10150 'Preset in use' shows last used preset name after deleting it --- indra/newview/llfloaterpreference.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d63ee1b367..92c9d1ae59 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2600,6 +2600,10 @@ void LLPanelPreferenceGraphics::onPresetsListChange() { instance->saveSettings(); //make cancel work correctly after changing the preset } + else + { + instance->saveGraphicsPreset(std::string()); + } } void LLPanelPreferenceGraphics::setPresetText() From c94e981f40652920a7fb5234a65369bf58d41865 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 3 Dec 2018 17:30:35 +0200 Subject: [PATCH 03/13] SL-10080 clamp instead of llmax --- indra/newview/llappviewer.cpp | 6 +++--- indra/newview/llviewercontrol.cpp | 6 +++--- indra/newview/llvoavatar.h | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bd45f68a5c..7c79cc7ddf 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -568,12 +568,12 @@ static void settings_to_globals() LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); - LLVOVolume::sLODFactor = llmin(gSavedSettings.getF32("RenderVolumeLODFactor"), MAX_LOD_FACTOR); + LLVOVolume::sLODFactor = llclamp(gSavedSettings.getF32("RenderVolumeLODFactor"), 0.01f, MAX_LOD_FACTOR); LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor"); LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); - LLVOAvatar::sLODFactor = llmin(gSavedSettings.getF32("RenderAvatarLODFactor"), MAX_LOD_FACTOR); - LLVOAvatar::sPhysicsLODFactor = llmin(gSavedSettings.getF32("RenderAvatarPhysicsLODFactor"), MAX_LOD_FACTOR); + LLVOAvatar::sLODFactor = llclamp(gSavedSettings.getF32("RenderAvatarLODFactor"), 0.f, MAX_AVATAR_LOD_FACTOR); + LLVOAvatar::sPhysicsLODFactor = llclamp(gSavedSettings.getF32("RenderAvatarPhysicsLODFactor"), 0.f, MAX_AVATAR_LOD_FACTOR); LLVOAvatar::updateImpostorRendering(gSavedSettings.getU32("RenderAvatarMaxNonImpostors")); LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); // clamp auto-open time to some minimum usable value diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index e62d6eb951..a699491e1b 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -219,20 +219,20 @@ static bool handleAnisotropicChanged(const LLSD& newvalue) static bool handleVolumeLODChanged(const LLSD& newvalue) { - LLVOVolume::sLODFactor = llmin((F32) newvalue.asReal(), MAX_LOD_FACTOR); + LLVOVolume::sLODFactor = llclamp((F32) newvalue.asReal(), 0.01f, MAX_LOD_FACTOR); LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; return true; } static bool handleAvatarLODChanged(const LLSD& newvalue) { - LLVOAvatar::sLODFactor = llmin((F32) newvalue.asReal(), MAX_LOD_FACTOR); + LLVOAvatar::sLODFactor = llclamp((F32) newvalue.asReal(), 0.f, MAX_AVATAR_LOD_FACTOR); return true; } static bool handleAvatarPhysicsLODChanged(const LLSD& newvalue) { - LLVOAvatar::sPhysicsLODFactor = llmin((F32) newvalue.asReal(), MAX_LOD_FACTOR); + LLVOAvatar::sPhysicsLODFactor = llclamp((F32) newvalue.asReal(), 0.f, MAX_AVATAR_LOD_FACTOR); return true; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index deb22617a4..a4f8e95c65 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -75,6 +75,8 @@ class LLTexGlobalColor; struct LLAppearanceMessageContents; class LLViewerJointMesh; +const F32 MAX_AVATAR_LOD_FACTOR = 1.0f; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatar From a39d330cc22c603d5c06fabe86104e8948573e20 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 3 Dec 2018 20:27:44 +0200 Subject: [PATCH 04/13] SL-10152 Uninstaller's offers to delete remaining files is problematic --- .../installers/windows/installer_template.nsi | 4 +--- .../newview/installers/windows/lang_en-us.nsi | Bin 8734 -> 8814 bytes 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 14c8dba39f..d6e4b005df 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -651,9 +651,7 @@ RMDir "$INSTDIR" IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER FOLDERFOUND: -# Silent uninstall always removes all files (/SD IDYES) - MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER - RMDir /r "$INSTDIR" + MessageBox MB_OK $(DeleteProgramFilesMB) /SD IDOK IDOK NOFOLDER NOFOLDER: diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index 00aa47de690a2a066ab023bccfe05a7559c3c938..f854f5db0605a6250e0f5bdaf2267687ee319dbd 100644 GIT binary patch delta 169 zcmbQ|^3G+$1=-0B@;sAo$!@9lWJqIBV5nrsXD9{Ic|cl$AqPn2F{Cr3G8BQuQh}@# zAghES1IWr{&;hawfT~g%5*dntqyj@SSSFbv8^}%s>IJDT0;|nuC Date: Tue, 4 Dec 2018 18:51:44 +0200 Subject: [PATCH 05/13] SL-10149 FIXED 'Mute when minimized' checkbox is displayed without focus on it after pressing on label in the "Preferences" floater --- indra/llui/llcheckboxctrl.h | 2 ++ indra/newview/llfloaterpreference.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index 5ce45b2135..71bdc32e66 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -92,6 +92,8 @@ public: // LLCheckBoxCtrl interface virtual BOOL toggle() { return mButton->toggleState(); } // returns new state + void setBtnFocus() { mButton->setFocus(TRUE); } + void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; } void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 92c9d1ae59..c66247b4b7 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2329,6 +2329,7 @@ BOOL LLPanelPreference::postBuild() if (hasChild("mute_chb_label", TRUE)) { getChild("mute_chb_label")->setShowCursorHand(false); + getChild("mute_chb_label")->setSoundFlags(LLView::MOUSE_UP); getChild("mute_chb_label")->setClickedCallback(boost::bind(&toggleMuteWhenMinimized)); } @@ -2452,6 +2453,11 @@ void LLPanelPreference::toggleMuteWhenMinimized() { std::string mute("MuteWhenMinimized"); gSavedSettings.setBOOL(mute, !gSavedSettings.getBOOL(mute)); + LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); + if (instance) + { + instance->getChild("mute_when_minimized")->setBtnFocus(); + } } void LLPanelPreference::cancel() From 6e87cc5a7570884e81c671bd6e94e3a2b68099ad Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 4 Dec 2018 20:45:49 +0200 Subject: [PATCH 06/13] mac build fix --- indra/newview/llfloaterpreference.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c66247b4b7..ac751a785d 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2608,7 +2608,8 @@ void LLPanelPreferenceGraphics::onPresetsListChange() } else { - instance->saveGraphicsPreset(std::string()); + std::string dummy; + instance->saveGraphicsPreset(dummy); } } From 4c92c7b2d025b7cd85bf176287b86a3990959841 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 4 Dec 2018 17:52:46 +0200 Subject: [PATCH 07/13] SL-1481 Don't predict region crossings over a second --- indra/newview/app_settings/settings.xml | 11 +++++ indra/newview/llviewerobject.cpp | 58 ++++++++++++++++++------- indra/newview/llviewerobject.h | 4 +- indra/newview/llviewerobjectlist.cpp | 2 + 4 files changed, 59 insertions(+), 16 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3ad8b6cded..0eef5120eb 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14068,6 +14068,17 @@ Value 1 + RegionCrossingInterpolationTime + + Comment + How long to extrapolate object motion after crossing regions + Persist + 1 + Type + F32 + Value + 1 + VerboseLogs Comment diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1e46a1cf9e..079a9f0372 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -127,6 +127,7 @@ BOOL LLViewerObject::sUseSharedDrawables(FALSE); // TRUE // sMaxUpdateInterpolationTime must be greater than sPhaseOutUpdateInterpolationTime F64Seconds LLViewerObject::sMaxUpdateInterpolationTime(3.0); // For motion interpolation: after X seconds with no updates, don't predict object motion F64Seconds LLViewerObject::sPhaseOutUpdateInterpolationTime(2.0); // For motion interpolation: after Y seconds with no updates, taper off motion prediction +F64Seconds LLViewerObject::sMaxRegionCrossingInterpolationTime(1.0);// For motion interpolation: don't interpolate over this time on region crossing std::map LLViewerObject::sObjectDataMap; @@ -2487,7 +2488,7 @@ void LLViewerObject::loadFlags(U32 flags) return; } -void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &time) +void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &frame_time) { //static LLTrace::BlockTimerStatHandle ftm("Viewer Object"); //LL_RECORD_BLOCK_TIME(ftm); @@ -2498,19 +2499,19 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &time) { // calculate dt from last update F32 time_dilation = mRegionp ? mRegionp->getTimeDilation() : 1.0f; - F32 dt_raw = ((F64Seconds)time - mLastInterpUpdateSecs).value(); + F32 dt_raw = ((F64Seconds)frame_time - mLastInterpUpdateSecs).value(); F32 dt = time_dilation * dt_raw; applyAngularVelocity(dt); if (isAttachment()) { - mLastInterpUpdateSecs = (F64Seconds)time; + mLastInterpUpdateSecs = (F64Seconds)frame_time; return; } else { // Move object based on it's velocity and rotation - interpolateLinearMotion(time, dt); + interpolateLinearMotion(frame_time, dt); } } @@ -2520,7 +2521,7 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &time) // Move an object due to idle-time viewer side updates by interpolating motion -void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, const F32SecondsImplicit& dt_seconds) +void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_time, const F32SecondsImplicit& dt_seconds) { // linear motion // PHYSICS_TIMESTEP is used below to correct for the fact that the velocity in object @@ -2532,7 +2533,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, con // zeroing it out F32 dt = dt_seconds; - F64Seconds time_since_last_update = time - mLastMessageUpdateSecs; + F64Seconds time_since_last_update = frame_time - mLastMessageUpdateSecs; if (time_since_last_update <= (F64Seconds)0.0 || dt <= 0.f) { return; @@ -2580,7 +2581,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, con (time_since_last_packet > sPhaseOutUpdateInterpolationTime)) { // Start to reduce motion interpolation since we haven't seen a server update in a while - F64Seconds time_since_last_interpolation = time - mLastInterpUpdateSecs; + F64Seconds time_since_last_interpolation = frame_time - mLastInterpUpdateSecs; F64 phase_out = 1.0; if (time_since_last_update > sMaxUpdateInterpolationTime) { // Past the time limit, so stop the object @@ -2636,6 +2637,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, con // Check to see if it's going off the region LLVector3 temp(new_pos); + static F64SecondsImplicit region_cross_expire = 0; // frame time we detected region crossing in + wait time if (temp.clamp(0.f, mRegionp->getWidth())) { // Going off this region, so see if we might end up on another region LLVector3d old_pos_global = mRegionp->getPosGlobalFromRegion(getPositionRegion()); @@ -2644,21 +2646,47 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, con // Clip the positions to known regions LLVector3d clip_pos_global = LLWorld::getInstance()->clipToVisibleRegions(old_pos_global, new_pos_global); if (clip_pos_global != new_pos_global) - { // Was clipped, so this means we hit a edge where there is no region to enter - - //LL_INFOS() << "Hit empty region edge, clipped predicted position to " << mRegionp->getPosRegionFromGlobal(clip_pos_global) - // << " from " << new_pos << LL_ENDL; - new_pos = mRegionp->getPosRegionFromGlobal(clip_pos_global); + { + // Was clipped, so this means we hit a edge where there is no region to enter + LLVector3 clip_pos = mRegionp->getPosRegionFromGlobal(clip_pos_global); + LL_DEBUGS("Interpolate") << "Hit empty region edge, clipped predicted position to " + << clip_pos + << " from " << new_pos << LL_ENDL; + new_pos = clip_pos; // Stop motion and get server update for bouncing on the edge new_v.clear(); setAcceleration(LLVector3::zero); } else - { // Let predicted movement cross into another region - //LL_INFOS() << "Predicting region crossing to " << new_pos << LL_ENDL; + { + // Check for how long we are crossing. + // Note: theoretically we can find time from velocity, acceleration and + // distance from border to new position, but it is not going to work + // if 'phase_out' activates + if (region_cross_expire == 0) + { + // Workaround: we can't accurately figure out time when we cross border + // so just write down time 'after the fact', it is far from optimal in + // case of lags, but for lags sMaxUpdateInterpolationTime will kick in first + LL_DEBUGS("Interpolate") << "Predicted region crossing, new position " << new_pos << LL_ENDL; + region_cross_expire = frame_time + sMaxRegionCrossingInterpolationTime; + } + else if (frame_time > region_cross_expire) + { + // Predicting crossing over 1s, stop motion + // Stop motion + LL_DEBUGS("Interpolate") << "Predicting region crossing for too long, stopping at " << new_pos << LL_ENDL; + new_v.clear(); + setAcceleration(LLVector3::zero); + region_cross_expire = 0; + } } } + else + { + region_cross_expire = 0; + } // Set new position and velocity setPositionRegion(new_pos); @@ -2669,7 +2697,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, con } // Update the last time we did anything - mLastInterpUpdateSecs = time; + mLastInterpUpdateSecs = frame_time; } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index d6c8b76147..990c392531 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -615,7 +615,7 @@ private: U32 checkMediaURL(const std::string &media_url); // Motion prediction between updates - void interpolateLinearMotion(const F64SecondsImplicit & time, const F32SecondsImplicit & dt); + void interpolateLinearMotion(const F64SecondsImplicit & frame_time, const F32SecondsImplicit & dt); static void initObjectDataMap(); @@ -851,6 +851,7 @@ protected: static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64Seconds) value; } static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64Seconds) value; } + static void setMaxRegionCrossingInterpolationTime(F32 value) { sMaxRegionCrossingInterpolationTime = (F64Seconds) value; } static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; } static void setPingInterpolate(BOOL value) { sPingInterpolate = value; } @@ -860,6 +861,7 @@ private: static F64Seconds sPhaseOutUpdateInterpolationTime; // For motion interpolation static F64Seconds sMaxUpdateInterpolationTime; // For motion interpolation + static F64Seconds sMaxRegionCrossingInterpolationTime; // For motion interpolation static BOOL sVelocityInterpolate; static BOOL sPingInterpolate; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 2aff71367e..932759c86d 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -854,6 +854,7 @@ void LLViewerObjectList::update(LLAgent &agent) F32 interp_time = gSavedSettings.getF32("InterpolationTime"); F32 phase_out_time = gSavedSettings.getF32("InterpolationPhaseOut"); + F32 region_interp_time = llclamp(gSavedSettings.getF32("RegionCrossingInterpolationTime"), 0.5f, 5.f); if (interp_time < 0.0 || phase_out_time < 0.0 || phase_out_time > interp_time) @@ -864,6 +865,7 @@ void LLViewerObjectList::update(LLAgent &agent) } LLViewerObject::setPhaseOutUpdateInterpolationTime( interp_time ); LLViewerObject::setMaxUpdateInterpolationTime( phase_out_time ); + LLViewerObject::setMaxRegionCrossingInterpolationTime(region_interp_time); gAnimateTextures = gSavedSettings.getBOOL("AnimateTextures"); From b39cfe229ba127b9ac3e47edd1255b95fe32c5ea Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 7 Dec 2018 13:31:54 +0200 Subject: [PATCH 08/13] SL-10175 Update copyright year in application info --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ce8b662231..33886acb71 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2074,7 +2074,7 @@ if (DARWIN) set(MACOSX_BUNDLE_BUNDLE_NAME "SecondLife") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}") set(MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}") - set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2007") + set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2018") set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "SecondLife.nib") set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication") From a48ff6c2fadb5697ab204a34ac696f1ce920e02d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 6 Dec 2018 19:50:33 +0200 Subject: [PATCH 09/13] SL-10172 Add a KB link to the TLS failure dialog --- indra/newview/llxmlrpctransaction.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 143c97fca4..f5c169996f 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -507,6 +507,8 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status) case CURLE_SSL_CACERT: case CURLE_SSL_CONNECT_ERROR: + { + std::string uri_base = "https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3"; message = "Often this means that your computer\'s clock is set incorrectly.\n" "Please go to Control Panels and make sure the time and date\n" @@ -514,8 +516,9 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status) "Also check that your network and firewall are set up correctly.\n" "If you continue to receive this error, please go\n" "to the Support section of the SecondLife.com web site\n" - "and report the problem."; + "and report the problem.\n\n[" + uri_base + " Knowledge Base]"; break; + } default: break; From 221201de4eaba585ae713b279a0e9ba1c8fd61cf Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Sun, 9 Dec 2018 20:57:36 +0200 Subject: [PATCH 10/13] SL-10001 Fixed scale --- indra/newview/llmanip.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 1dc03123eb..6589aa477f 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -441,14 +441,13 @@ void LLManip::renderXYZ(const LLVector3 &vec) LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); gViewerWindow->setup2DRender(); const LLVector2& display_scale = gViewerWindow->getDisplayScale(); - gGL.scalef(display_scale.mV[VX], display_scale.mV[VY], 1.f); gGL.color4f(0.f, 0.f, 0.f, 0.7f); imagep->draw( - window_center_x - 115, - window_center_y + vertical_offset - PAD, - 235, - PAD * 2 + 10, + (window_center_x - 115) * display_scale.mV[VX], + (window_center_y + vertical_offset - PAD) * display_scale.mV[VY], + 235 * display_scale.mV[VX], + (PAD * 2 + 10) * display_scale.mV[VY], LLColor4(0.f, 0.f, 0.f, 0.7f) ); LLFontGL* font = LLFontGL::getFontSansSerif(); From 1e5ad657abcff4f3bd8d4b6f870e15b75215799d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 10 Dec 2018 18:28:45 +0200 Subject: [PATCH 11/13] SL-10092 Autoreplace Keyword was not working with non-English characters --- indra/newview/llautoreplace.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index dd9354fe3a..0516520c56 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -68,8 +68,8 @@ void LLAutoReplace::autoreplaceCallback(S32& replacement_start, S32& replacement word_start--; // walk word_start back to the beginning of the word } LL_DEBUGS("AutoReplace") << "word_start: " << word_start << " word_end: " << word_end << LL_ENDL; - std::string str_text = std::string(input_text.begin(), input_text.end()); - std::string last_word = str_text.substr(word_start, word_end - word_start + 1); + LLWString old_string = input_text.substr(word_start, word_end - word_start + 1); + std::string last_word = wstring_to_utf8str(old_string); std::string replacement_word(mSettings.replaceWord(last_word)); if (replacement_word != last_word) @@ -79,9 +79,8 @@ void LLAutoReplace::autoreplaceCallback(S32& replacement_start, S32& replacement { // return the replacement string replacement_start = word_start; - replacement_length = last_word.length(); + replacement_length = word_end - word_start + 1; replacement_string = utf8str_to_wstring(replacement_word); - LLWString old_string = utf8str_to_wstring(last_word); S32 size_change = replacement_string.size() - old_string.size(); cursor_pos += size_change; } From c658e891345fd98dcededa5c21efc17993805522 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 12 Dec 2018 15:24:26 +0200 Subject: [PATCH 12/13] SL-9512 Move constant to common place --- indra/newview/lltoastnotifypanel.cpp | 8 +++----- indra/newview/lltoastpanel.cpp | 3 +++ indra/newview/lltoastpanel.h | 1 + indra/newview/lltoastscripttextbox.cpp | 4 +--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index e3a856be5c..a2116817a2 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -46,8 +46,6 @@ const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding S32 BUTTON_WIDTH = 90; -// *TODO: magic numbers - copied from llnotify.cpp(250) -const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; //static @@ -319,7 +317,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) mTextBox = getChild("text_editor_box"); } - mTextBox->setMaxTextLength(MAX_LENGTH); + mTextBox->setMaxTextLength(LLToastPanel::MAX_TEXT_LENGTH); mTextBox->setVisible(TRUE); mTextBox->setPlainText(!show_images); mTextBox->setContentTrusted(is_content_trusted); @@ -411,7 +409,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) //.xml file intially makes info panel only follow left/right/top. This is so that when control buttons are added the info panel //can shift upward making room for the buttons inside mControlPanel. After the buttons are added, the info panel can then be set to follow 'all'. mInfoPanel->setFollowsAll(); - snapToMessageHeight(mTextBox, MAX_LENGTH); + snapToMessageHeight(mTextBox, LLToastPanel::MAX_TEXT_LENGTH); // reshape the panel to its previous size if (current_rect.notEmpty()) @@ -472,7 +470,7 @@ void LLIMToastNotifyPanel::snapToMessageHeight() //Add message height if it is visible if (mTextBox->getVisible()) { - S32 new_panel_height = computeSnappedToMessageHeight(mTextBox, MAX_LENGTH); + S32 new_panel_height = computeSnappedToMessageHeight(mTextBox, LLToastPanel::MAX_TEXT_LENGTH); //reshape the panel with new height if (new_panel_height != getRect().getHeight()) diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index e1b764a943..7c624d5b50 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -26,6 +26,7 @@ #include "llviewerprecompiledheaders.h" +#include "lldbstrings.h" #include "llpanelgenerictip.h" #include "llpanelonlinestatus.h" #include "llnotifications.h" @@ -35,6 +36,8 @@ //static const S32 LLToastPanel::MIN_PANEL_HEIGHT = 40; // VPAD(4)*2 + ICON_HEIGHT(32) +// 'magic numbers', consider initializing (512+20) part from xml/notifications +const S32 LLToastPanel::MAX_TEXT_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; LLToastPanel::LLToastPanel(const LLNotificationPtr& notification) { diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h index 51630381f2..6a9b72a5ae 100644 --- a/indra/newview/lltoastpanel.h +++ b/indra/newview/lltoastpanel.h @@ -49,6 +49,7 @@ public: virtual const LLUUID& getID(); static const S32 MIN_PANEL_HEIGHT; + static const S32 MAX_TEXT_LENGTH; /** * Builder method for constructing notification specific panels. diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index 518c6c0ee4..eb86a44055 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -36,8 +36,6 @@ #include "llviewertexteditor.h" const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 14; -// *TODO: magic numbers - copied from lltoastnotifypanel.cpp(50) which was copied from llnotify.cpp(250) -const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification) : LLToastPanel(notification) @@ -45,7 +43,7 @@ LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification buildFromFile( "panel_notify_textbox.xml"); mInfoText = getChild("text_editor_box"); - mInfoText->setMaxTextLength(MAX_LENGTH); + mInfoText->setMaxTextLength(LLToastPanel::MAX_TEXT_LENGTH); mInfoText->setValue(notification->getMessage()); getChild("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this)); From 21d4ce26d3b3db5458321271ea5b7c7069289c94 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 12 Dec 2018 00:11:16 +0200 Subject: [PATCH 13/13] INTL-324 added support for TLS failure dialog localization --- indra/newview/llxmlrpctransaction.cpp | 31 +++++-------------- .../newview/skins/default/xui/en/strings.xml | 25 +++++++++++++++ 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index f5c169996f..cc223c1f48 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -483,42 +483,25 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status) { CURLcode code = static_cast(status.toULong()); std::string message; - std::string uri = "http://secondlife.com/community/support.php"; + std::string uri = "http://support.secondlife.com"; LLURI failuri(mURI); - + LLStringUtil::format_map_t args; switch (code) { case CURLE_COULDNT_RESOLVE_HOST: - message = - std::string("DNS could not resolve the host name(") + failuri.hostName() + ").\n" - "Please verify that you can connect to the www.secondlife.com\n" - "web site. If you can, but continue to receive this error,\n" - "please go to the support section and report this problem."; + args["[HOSTNAME]"] = failuri.hostName(); + message = LLTrans::getString("couldnt_resolve_host", args); break; case CURLE_SSL_PEER_CERTIFICATE: - message = - "The login server couldn't verify itself via SSL.\n" - "If you continue to receive this error, please go\n" - "to the Support section of the SecondLife.com web site\n" - "and report the problem."; + message = LLTrans::getString("ssl_peer_certificate"); break; case CURLE_SSL_CACERT: - case CURLE_SSL_CONNECT_ERROR: - { - std::string uri_base = "https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3"; - message = - "Often this means that your computer\'s clock is set incorrectly.\n" - "Please go to Control Panels and make sure the time and date\n" - "are set correctly.\n" - "Also check that your network and firewall are set up correctly.\n" - "If you continue to receive this error, please go\n" - "to the Support section of the SecondLife.com web site\n" - "and report the problem.\n\n[" + uri_base + " Knowledge Base]"; + case CURLE_SSL_CONNECT_ERROR: + message = LLTrans::getString("ssl_connect_error"); break; - } default: break; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f5f4b4acab..e8fdb2d5b1 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4233,4 +4233,29 @@ Try enclosing path to the editor with double quotes. The physics shape does not have correct version. Set the correct version for the physics model. + + +DNS could not resolve the host name([HOSTNAME]). +Please verify that you can connect to the www.secondlife.com +web site. If you can, but continue to receive this error, +please go to the support section and report this problem. + + +The login server couldn't verify itself via SSL. +If you continue to receive this error, please go +to the Support section of the SecondLife.com web site +and report the problem. + + +Often this means that your computer's clock is set incorrectly. +Please go to Control Panels and make sure the time and date +are set correctly. +Also check that your network and firewall are set up correctly. +If you continue to receive this error, please go +to the Support section of the SecondLife.com web site +and report the problem. + +[https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3 Knowledge Base] + +