From b3e444c74e0f31ba9d63d7bed934f017bf2499df Mon Sep 17 00:00:00 2001 From: callum Date: Thu, 17 Mar 2011 17:18:58 -0700 Subject: 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) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llfloaterwebcontent.cpp | 6 ++++++ indra/newview/llmediactrl.cpp | 16 ---------------- indra/newview/llmediactrl.h | 4 ---- 4 files changed, 17 insertions(+), 20 deletions(-) (limited to 'indra/newview') 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 @@ Value 1 + WebContentFloaterErrorURL + + Comment + URL to navigate to if the Web content floater hits a page with a 400-499 HTTP status code + Persist + 1 + Type + String + Value + http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/damballah/404.html + 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 @@ -501,22 +501,6 @@ bool LLMediaCtrl::canNavigateForward() return false; } -//////////////////////////////////////////////////////////////////////////////// -// -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() 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(); -- cgit v1.2.3