Merge viewer-neko

master
Ansariel 2018-12-13 00:34:43 +01:00
commit b4ab48c849
20 changed files with 152 additions and 70 deletions

View File

@ -97,6 +97,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; }

View File

@ -786,14 +786,30 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
// [SL:KB] - Patch: UI-Notecards | Checked: 2010-09-12 (Catznip-2.1.2d) | Added: Catznip-2.1.2d
setCursorAtLocalPos(x, y, FALSE);
// [/SL:KB]
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;
}

View File

@ -17543,6 +17543,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<real>1.0</real>
</map>
<key>RegionCrossingInterpolationTime</key>
<map>
<key>Comment</key>
<string>How long to extrapolate object motion after crossing regions</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>VerboseLogs</key>
<map>
<key>Comment</key>

View File

@ -732,9 +732,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:

View File

@ -637,12 +637,12 @@ static void settings_to_globals()
// </FS:Ansariel>
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

View File

@ -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;
}

View File

@ -3681,6 +3681,7 @@ BOOL LLPanelPreference::postBuild()
if (hasChild("mute_chb_label", TRUE))
{
getChild<LLTextBox>("mute_chb_label")->setShowCursorHand(false);
getChild<LLTextBox>("mute_chb_label")->setSoundFlags(LLView::MOUSE_UP);
getChild<LLTextBox>("mute_chb_label")->setClickedCallback(boost::bind(&toggleMuteWhenMinimized));
}
@ -3845,6 +3846,11 @@ void LLPanelPreference::toggleMuteWhenMinimized()
{
std::string mute("MuteWhenMinimized");
gSavedSettings.setBOOL(mute, !gSavedSettings.getBOOL(mute));
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
if (instance)
{
instance->getChild<LLCheckBoxCtrl>("mute_when_minimized")->setBtnFocus();
}
}
// <FS:Ansariel> Only enable Growl checkboxes if Growl is usable
@ -4176,6 +4182,11 @@ void LLPanelPreferenceGraphics::onPresetsListChange()
//{
// instance->saveSettings(); //make cancel work correctly after changing the preset
//}
//else
//{
// std::string dummy;
// instance->saveGraphicsPreset(dummy);
//}
}
void LLPanelPreferenceGraphics::setPresetText()

View File

@ -489,16 +489,14 @@ 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();
LLLocale locale(LLLocale::USER_LOCALE);
LLGLDepthTest gls_depth(GL_FALSE);

View File

@ -50,8 +50,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
@ -326,7 +324,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
mTextBox = getChild<LLTextEditor>("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);
@ -437,16 +435,16 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
//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();
// <FS:Ansariel> FIRE-17100: Customizable number of rows in a script dialog
//snapToMessageHeight(mTextBox, MAX_LENGTH);
//snapToMessageHeight(mTextBox, LLToastPanel::MAX_TEXT_LENGTH);
if (mIsScriptDialog)
{
S32 rows = gSavedSettings.getS32("FSRowsPerScriptDialog");
llclamp(rows, 2, MAX_LENGTH);
llclamp(rows, 2, LLToastPanel::MAX_TEXT_LENGTH);
snapToMessageHeight(mTextBox, rows);
}
else
{
snapToMessageHeight(mTextBox, MAX_LENGTH);
snapToMessageHeight(mTextBox, LLToastPanel::MAX_TEXT_LENGTH);
}
// </FS:Ansariel>
@ -509,7 +507,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())

View File

@ -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)
{

View File

@ -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.

View File

@ -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<LLTextEditor>("text_editor_box");
mInfoText->setMaxTextLength(MAX_LENGTH);
mInfoText->setMaxTextLength(LLToastPanel::MAX_TEXT_LENGTH);
mInfoText->setValue(notification->getMessage());
getChild<LLButton>("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this));

View File

@ -291,7 +291,7 @@ 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;
// <FS:PP> Warning about too high LOD on LOD change
@ -306,13 +306,13 @@ static bool handleVolumeLODChanged(const LLSD& newvalue)
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;
}

View File

@ -139,6 +139,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<std::string, U32> LLViewerObject::sObjectDataMap;
@ -2551,7 +2552,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);
@ -2562,19 +2563,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);
}
}
@ -2584,7 +2585,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
@ -2596,7 +2597,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;
@ -2644,7 +2645,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
@ -2704,6 +2705,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());
@ -2738,21 +2740,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);
@ -2763,7 +2791,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, con
}
// Update the last time we did anything
mLastInterpUpdateSecs = time;
mLastInterpUpdateSecs = frame_time;
}

View File

@ -629,7 +629,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();
@ -868,6 +868,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; }
@ -877,6 +878,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;

View File

@ -940,6 +940,7 @@ void LLViewerObjectList::update(LLAgent &agent)
static LLCachedControl<bool> pingInterpolate(gSavedSettings, "PingInterpolate");
static LLCachedControl<F32> interpolationTime(gSavedSettings, "InterpolationTime");
static LLCachedControl<F32> interpolationPhaseOut(gSavedSettings, "InterpolationPhaseOut");
static LLCachedControl<F32> regionCrossingInterpolationTime(gSavedSettings, "RegionCrossingInterpolationTime");
static LLCachedControl<bool> animateTextures(gSavedSettings, "AnimateTextures");
static LLCachedControl<bool> freezeTime(gSavedSettings, "FreezeTime");
// </FS:Ansariel> Speed up debug settings
@ -951,11 +952,13 @@ 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);
LLViewerObject::setVelocityInterpolate(velocityInterpolate);
LLViewerObject::setPingInterpolate(pingInterpolate);
F32 interp_time = (F32)interpolationTime;
F32 phase_out_time = (F32)interpolationPhaseOut;
F32 region_interp_time = llclamp(regionCrossingInterpolationTime(), 0.5f, 5.f);
// </FS:Ansariel> Speed up debug settings
if (interp_time < 0.0 ||
phase_out_time < 0.0 ||
@ -967,6 +970,7 @@ void LLViewerObjectList::update(LLAgent &agent)
}
LLViewerObject::setPhaseOutUpdateInterpolationTime( interp_time );
LLViewerObject::setMaxUpdateInterpolationTime( phase_out_time );
LLViewerObject::setMaxRegionCrossingInterpolationTime(region_interp_time);
// <FS:Ansariel> Speed up debug settings
//gAnimateTextures = gSavedSettings.getBOOL("AnimateTextures");
@ -1061,7 +1065,7 @@ void LLViewerObjectList::update(LLAgent &agent)
objectp = *idle_iter;
llassert(objectp->isActive());
objectp->idleUpdate(agent, frame_time);
}
}
//update flexible objects
LLVolumeImplFlexible::updateClass();

View File

@ -75,6 +75,8 @@ class LLTexGlobalColor;
struct LLAppearanceMessageContents;
class LLViewerJointMesh;
const F32 MAX_AVATAR_LOD_FACTOR = 1.0f;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// LLVOAvatar

View File

@ -483,38 +483,24 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status)
{
CURLcode code = static_cast<CURLcode>(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:
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.";
case CURLE_SSL_CONNECT_ERROR:
message = LLTrans::getString("ssl_connect_error");
break;
default:

View File

@ -2858,6 +2858,31 @@ 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.
</string>
<!-- CURL error messages -->
<string name="couldnt_resolve_host">
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.
</string>
<string name="ssl_peer_certificate">
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.
</string>
<string name="ssl_connect_error">
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]
</string>
<string name="LoadCameraPositionNoneSaved">No camera view has been saved yet.</string>
<string name="LoadCameraPositionOutsideDrawDistance">Can't restore camera view because the camera position is beyond draw distance.</string>