summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-07-22 17:36:59 -0700
committerAndrew A. de Laix <alain@lindenlab.com>2010-07-22 17:36:59 -0700
commit7ee930ea4a5721077974bc5b24d8cc1c6b6a2fae (patch)
tree85fe4a48c5c61da93ce456b1af120e0312c33c51 /indra
parent7600b0bcd0751d15c855a44cbaad6d94f745869b (diff)
parentaac8bf09885a30953822f1edee0fddeb1e6722a0 (diff)
Merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llmessage/llcurl.cpp15
-rw-r--r--indra/llmessage/llcurl.h6
-rw-r--r--indra/llrender/llimagegl.cpp9
-rw-r--r--indra/llui/llcheckboxctrl.cpp30
-rw-r--r--indra/newview/lldynamictexture.cpp4
-rw-r--r--indra/newview/lltexturefetch.cpp23
-rw-r--r--indra/newview/skins/default/xui/fr/floater_water.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_windlight_options.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_nearby_media.xml2
9 files changed, 53 insertions, 40 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 36874a5d48..ac50411de8 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -364,13 +364,6 @@ U32 LLCurl::Easy::report(CURLcode code)
responseCode = 499;
responseReason = strerror(code) + " : " + mErrorBuffer;
}
-
- if(responseCode >= 300 && responseCode < 400) //redirect
- {
- char new_url[512] ;
- curl_easy_getinfo(mCurlEasyHandle, CURLINFO_REDIRECT_URL, new_url);
- responseReason = new_url ; //get the new URL.
- }
if (mResponder)
{
@@ -469,6 +462,13 @@ void LLCurl::Easy::prepRequest(const std::string& url,
setopt(CURLOPT_HEADERFUNCTION, (void*)&curlHeaderCallback);
setopt(CURLOPT_HEADERDATA, (void*)this);
+ // Allow up to five redirects
+ if(responder && responder->followRedir())
+ {
+ setopt(CURLOPT_FOLLOWLOCATION, 1);
+ setopt(CURLOPT_MAXREDIRS, MAX_REDIRECTS);
+ }
+
setErrorBuffer();
setCA();
@@ -1061,3 +1061,4 @@ void LLCurl::cleanupClass()
curl_global_cleanup();
}
+const unsigned int LLCurl::MAX_REDIRECTS = 5;
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index b6a637ae5b..20ca87c87b 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -123,6 +123,11 @@ public:
// Used internally to set the url for debugging later.
void setURL(const std::string& url);
+ virtual bool followRedir()
+ {
+ return false;
+ }
+
public: /* but not really -- don't touch this */
U32 mReferenceCount;
@@ -182,6 +187,7 @@ public:
private:
static std::string sCAPath;
static std::string sCAFile;
+ static const unsigned int MAX_REDIRECTS;
};
namespace boost
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 2d408f8e10..69ef3f9ed7 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -109,11 +109,20 @@ void LLImageGL::checkTexSize(bool forced) const
{
if ((forced || gDebugGL) && mTarget == GL_TEXTURE_2D)
{
+ {
+ //check viewport
+ GLint vp[4] ;
+ glGetIntegerv(GL_VIEWPORT, vp) ;
+ llcallstacks << "viewport: " << vp[0] << " : " << vp[1] << " : " << vp[2] << " : " << vp[3] << llcallstacksendl ;
+ }
+
GLint texname;
glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname);
BOOL error = FALSE;
if (texname != mTexName)
{
+ llinfos << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << llendl;
+
error = TRUE;
if (gDebugSession)
{
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index 6f81f5434c..0c524cd470 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -81,17 +81,6 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
// must be big enough to hold all children
setUseBoundingRect(TRUE);
- // Label (add a little space to make sure text actually renders)
- const S32 FUDGE = 10;
- S32 text_width = mFont->getWidth( p.label ) + FUDGE;
- S32 text_height = llround(mFont->getLineHeight());
- LLRect label_rect;
- label_rect.setOriginAndSize(
- llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
- llcheckboxctrl_vpad + 1, // padding to get better alignment
- text_width + llcheckboxctrl_hpad,
- text_height );
-
// *HACK Get rid of this with SL-55508...
// this allows blank check boxes and radio boxes for now
std::string local_label = p.label;
@@ -101,7 +90,6 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
}
LLTextBox::Params tbparams = p.label_text;
- tbparams.rect(label_rect);
tbparams.initial_value(local_label);
if (p.font.isProvided())
{
@@ -111,6 +99,17 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
addChild(mLabel);
+ S32 text_width = mLabel->getTextBoundingRect().getWidth();
+ S32 text_height = llround(mFont->getLineHeight());
+ LLRect label_rect;
+ label_rect.setOriginAndSize(
+ llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
+ llcheckboxctrl_vpad + 1, // padding to get better alignment
+ text_width + llcheckboxctrl_hpad,
+ text_height );
+ mLabel->setShape(label_rect);
+
+
// Button
// Note: button cover the label by extending all the way to the right.
LLRect btn_rect;
@@ -190,8 +189,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
- const S32 FUDGE = 10;
- S32 text_width = mLabel->getTextBoundingRect().getWidth() + FUDGE;
+ S32 text_width = mLabel->getTextBoundingRect().getWidth();
S32 text_height = llround(mFont->getLineHeight());
LLRect label_rect;
label_rect.setOriginAndSize(
@@ -199,7 +197,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
llcheckboxctrl_vpad,
text_width,
text_height );
- mLabel->setRect(label_rect);
+ mLabel->setShape(label_rect);
LLRect btn_rect;
btn_rect.setOriginAndSize(
@@ -207,7 +205,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
llcheckboxctrl_vpad,
llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width,
llmax( text_height, llcheckboxctrl_btn_size() ) );
- mButton->setRect( btn_rect );
+ mButton->setShape( btn_rect );
LLUICtrl::reshape(width, height, called_from_parent);
}
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index c423473740..bb4e6c7a3e 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -167,6 +167,10 @@ void LLViewerDynamicTexture::postRender(BOOL success)
{
generateGLTexture() ;
}
+ if(!mGLTexturep->getHasGLTexture())
+ {
+ generateGLTexture() ;
+ }
llcallstacks << "class type: " << (S32)getType() << llcallstacksendl ;
success = mGLTexturep->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight);
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index ceed90e210..dddfed097d 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -290,8 +290,8 @@ class HTTPGetResponder : public LLCurl::Responder
{
LOG_CLASS(HTTPGetResponder);
public:
- HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset)
- : mFetcher(fetcher), mID(id), mStartTime(startTime), mRequestedSize(requestedSize), mOffset(offset)
+ HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id, U64 startTime, S32 requestedSize, U32 offset, bool redir)
+ : mFetcher(fetcher), mID(id), mStartTime(startTime), mRequestedSize(requestedSize), mOffset(offset), mFollowRedir(redir)
{
}
~HTTPGetResponder()
@@ -344,6 +344,11 @@ public:
llwarns << "Worker not found: " << mID << llendl;
}
}
+
+ virtual bool followRedir()
+ {
+ return mFollowRedir;
+ }
private:
LLTextureFetch* mFetcher;
@@ -351,6 +356,7 @@ private:
U64 mStartTime;
S32 mRequestedSize;
U32 mOffset;
+ bool mFollowRedir;
};
//////////////////////////////////////////////////////////////////////////////
@@ -897,7 +903,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
std::vector<std::string> headers;
headers.push_back("Accept: image/x-j2c");
res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize,
- new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset));
+ new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset, true));
}
if (!res)
{
@@ -945,17 +951,6 @@ bool LLTextureFetchWorker::doWork(S32 param)
max_attempts = mHTTPFailCount+1; // Keep retrying
LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL;
}
- else if(mGetStatus >= HTTP_MULTIPLE_CHOICES && mGetStatus < HTTP_BAD_REQUEST) //http re-direct
- {
- ++mHTTPFailCount;
- max_attempts = 5 ; //try at most 5 times to avoid infinite redirection loop.
-
- llwarns << "HTTP GET failed because of redirection: " << mUrl
- << " Status: " << mGetStatus << " Reason: '" << mGetReason << llendl ;
-
- //assign to the new url
- mUrl = mGetReason ;
- }
else
{
const S32 HTTP_MAX_RETRY_COUNT = 3;
diff --git a/indra/newview/skins/default/xui/fr/floater_water.xml b/indra/newview/skins/default/xui/fr/floater_water.xml
index 96723b0fe6..7d1e3cd65c 100644
--- a/indra/newview/skins/default/xui/fr/floater_water.xml
+++ b/indra/newview/skins/default/xui/fr/floater_water.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="Water Floater" title="ÉDITEUR D&apos;EAU AVANCÉ">
<floater.string name="WLDefaultWaterNames">
- Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
+ Valeur par défaut:Transparente:Bassin:Trouble:Première plaie:SERPENT !!!:Valdez
</floater.string>
<text name="KeyFramePresetsText" width="120">
Préréglages :
diff --git a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
index 74f1697449..657e5f5051 100644
--- a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
@@ -184,6 +184,6 @@
</panel>
</tab_container>
<string name="WLDefaultSkyNames">
- A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
+ A-Minuit:A-Midi:A-3h:A-15h:A-16h30:A-6h:A-18h:A-9h:A-21h:Barcelone:Blizzard:Bleu mi-journée:Après-midi sur la côte:Coucher de soleil (côte):Valeur par défaut:Coucher de soleil (désert):Belle journée:Gros nuages floconneux:Brumeux:Funky Funky:Funky Funky Funky:Gelatto:Fantôme:Vérités incohérentes:Mi-journée 1:Mi-journée 2:Mi-journée 3:Mi-journée 4:Nuit:Pirate:Mauve:Rêve de navigateur:Sensualité pure
</string>
</floater>
diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
index 978ca86d62..1a6101830b 100644
--- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
@@ -27,7 +27,7 @@
Médias proches
</text>
<text name="show_text">
- Afficher :
+ Voir :
</text>
<combo_box name="show_combo">
<combo_box.item label="Tout" name="All"/>