summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorcallum <none@none>2011-03-17 17:18:58 -0700
committercallum <none@none>2011-03-17 17:18:58 -0700
commitb3e444c74e0f31ba9d63d7bed934f017bf2499df (patch)
treefb02d73ab7327d13e288cd952c34d9c9986112eb /indra/newview
parent3f64343b0b078e481c1c852ccd7201be6826a110 (diff)
SOCIAL-634 FIX Error condition content for Destination Guide, Avatar Picker,
and Help if S3 content or web content is not available. (Included refs to new LLQtWebKit that supports functionality)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llfloaterwebcontent.cpp6
-rw-r--r--indra/newview/llmediactrl.cpp16
-rw-r--r--indra/newview/llmediactrl.h4
4 files changed, 17 insertions, 20 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6a89f5681d..c626538808 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12586,5 +12586,16 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>WebContentFloaterErrorURL</key>
+ <map>
+ <key>Comment</key>
+ <string>URL to navigate to if the Web content floater hits a page with a 400-499 HTTP status code</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/damballah/404.html</string>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 058567492b..76fb985b39 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -328,6 +328,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
const std::string link = self->getHoverLink();
mStatusBarText->setText( link );
}
+ else if(event == MEDIA_EVENT_NAVIGATE_ERROR_PAGE )
+ {
+ std::string redirect_url = gSavedSettings.getString("WebContentFloaterErrorURL");
+ mWebBrowser->navigateTo(redirect_url, "text/html");
+ set_current_url(redirect_url);
+ }
}
void LLFloaterWebContent::set_current_url(const std::string& url)
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 9493fddf50..24038d0ee6 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -503,22 +503,6 @@ bool LLMediaCtrl::canNavigateForward()
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::set404RedirectUrl( std::string redirect_url )
-{
- if(mMediaSource && mMediaSource->hasMedia())
- mMediaSource->getMediaPlugin()->set_status_redirect( 404, redirect_url );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-void LLMediaCtrl::clr404RedirectUrl()
-{
- if(mMediaSource && mMediaSource->hasMedia())
- mMediaSource->getMediaPlugin()->set_status_redirect(404, "");
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
void LLMediaCtrl::clearCache()
{
if(mMediaSource)
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 38a74f90d3..7a28b0986d 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -113,10 +113,6 @@ public:
void setTarget(const std::string& target);
- // set/clear URL to visit when a 404 page is reached
- void set404RedirectUrl( std::string redirect_url );
- void clr404RedirectUrl();
-
// Clear the browser cache when the instance gets loaded
void clearCache();