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/llmediactrl.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview/llmediactrl.cpp') 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() -- cgit v1.2.3 From efc57ea349d634d2bef1a554a925bea60f26f307 Mon Sep 17 00:00:00 2001 From: callum Date: Thu, 17 Mar 2011 18:50:44 -0700 Subject: Fix for Mac specific compiler error. All enumerants of an enum have to be present in a switch statement if there is no default. --- indra/newview/llmediactrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llmediactrl.cpp') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 24038d0ee6..376e38ade3 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -960,6 +960,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) }; break; + case MEDIA_EVENT_NAVIGATE_ERROR_PAGE: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_ERROR_PAGE" << LL_ENDL; + }; + break; + case MEDIA_EVENT_CLICK_LINK_HREF: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << self->getClickTarget() << "\", uri is " << self->getClickURL() << LL_ENDL; -- cgit v1.2.3 From a57729b9260ce5e711bff47c02ca54ab65eade27 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 22 Mar 2011 13:58:27 -0700 Subject: SOCIAL-634 FIX Error condition content for Destination Guide, Avatar Picker, and Help if S3 content or web content is not available --- indra/newview/llmediactrl.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llmediactrl.cpp') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 376e38ade3..b8c61068c4 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -73,6 +73,7 @@ LLMediaCtrl::Params::Params() texture_height("texture_height", 1024), caret_color("caret_color"), initial_mime_type("initial_mime_type"), + error_page_url("error_page_url"), media_id("media_id"), trusted_content("trusted_content", false), focus_on_click("focus_on_click", true) @@ -102,6 +103,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mTextureHeight ( 1024 ), mClearCache(false), mHomePageMimeType(p.initial_mime_type), + mErrorPageURL(p.error_page_url), mTrusted(p.trusted_content), mWindowShade(NULL), mHoverTextChanged(false) @@ -610,6 +612,16 @@ void LLMediaCtrl::setTarget(const std::string& target) } } +void LLMediaCtrl::setErrorPageURL(const std::string& url) +{ + mErrorPageURL = url; +} + +const std::string& LLMediaCtrl::getErrorPageURL() +{ + return mErrorPageURL; +} + //////////////////////////////////////////////////////////////////////////////// // bool LLMediaCtrl::setCaretColor(unsigned int red, unsigned int green, unsigned int blue) @@ -963,6 +975,10 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_NAVIGATE_ERROR_PAGE: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_ERROR_PAGE" << LL_ENDL; + if ( mErrorPageURL.length() > 0 ) + { + navigateTo(mErrorPageURL, "text/html"); + }; }; break; -- cgit v1.2.3 From a5572505d843778b7f5395e25f9b9d15178bb423 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 24 Mar 2011 19:37:00 -0700 Subject: SOCIAL-509 FIX There is no way to copy a user name from web profile with the mouse --- indra/newview/llmediactrl.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llmediactrl.cpp') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index b8c61068c4..0199958c62 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -44,6 +44,7 @@ #include "llslurl.h" #include "lluictrlfactory.h" // LLDefaultChildRegistry #include "llkeyboard.h" +#include "llviewermenu.h" // linden library includes #include "llfocusmgr.h" @@ -106,7 +107,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mErrorPageURL(p.error_page_url), mTrusted(p.trusted_content), mWindowShade(NULL), - mHoverTextChanged(false) + mHoverTextChanged(false), + mContextMenu(NULL) { { LLColor4 color = p.caret_color().get(); @@ -151,6 +153,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : LLMediaCtrl::~LLMediaCtrl() { + delete mContextMenu; if (mMediaSource) { @@ -318,6 +321,12 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) setFocus( TRUE ); } + if (mContextMenu) + { + mContextMenu->show(x, y); + LLMenuGL::showPopup(this, mContextMenu, x, y); + } + return TRUE; } @@ -380,6 +389,8 @@ void LLMediaCtrl::onFocusLost() // BOOL LLMediaCtrl::postBuild () { + mContextMenu = LLUICtrlFactory::getInstance()->createFromFile( + "menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2)); return TRUE; } -- cgit v1.2.3 From e9eff2b00975a753217d75437ffd89b62e96227b Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 25 Mar 2011 10:51:06 -0700 Subject: SOCIAL-808 FIX Crash on exit in LLMediaCtrl --- indra/newview/llmediactrl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llmediactrl.cpp') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 0199958c62..2ed4e136b9 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -153,8 +153,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : LLMediaCtrl::~LLMediaCtrl() { - delete mContextMenu; - if (mMediaSource) { mMediaSource->remObserver( this ); @@ -389,8 +387,8 @@ void LLMediaCtrl::onFocusLost() // BOOL LLMediaCtrl::postBuild () { - mContextMenu = LLUICtrlFactory::getInstance()->createFromFile( - "menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + mContextMenu = LLUICtrlFactory::getInstance()->createFromFile( + "menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2)); return TRUE; } -- cgit v1.2.3 From 08846c3f72c22aa1d0006548204f62b5b8d1bd05 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 25 Mar 2011 13:06:28 -0700 Subject: SOCIAL-509 FIX There is no way to copy a user name from web profile with the mouse fixed spawning location of context menu removed keyboard shortcuts from context menus (where they don't belong) --- indra/newview/llmediactrl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llmediactrl.cpp') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 2ed4e136b9..5007f1c17a 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -307,10 +307,12 @@ BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask ) BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) { if (LLPanel::handleRightMouseDown(x, y, mask)) return TRUE; - convertInputCoords(x, y); + + S32 media_x = x, media_y = y; + convertInputCoords(media_x, media_y); if (mMediaSource) - mMediaSource->mouseDown(x, y, mask, 1); + mMediaSource->mouseDown(media_x, media_y, mask, 1); gFocusMgr.setMouseCapture( this ); -- cgit v1.2.3