From 2a58e320cb06308860de1df0ac30a40d1fa6e2ba Mon Sep 17 00:00:00 2001 From: skolb Date: Mon, 1 Mar 2010 18:08:00 -0800 Subject: https://jira.secondlife.com/browse/EXT-5884 Added code to support SLAPPS for Media on a Prim Reviewed by Monroe and Callum via Code Collab (Review 143). --- indra/newview/llmediactrl.cpp | 7 ------- indra/newview/llviewermedia.cpp | 9 +++++++++ indra/newview/llviewerparcelmedia.cpp | 6 ------ 3 files changed, 9 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index bf33d8527e..c244bc38ed 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -943,13 +943,6 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) }; break; - case MEDIA_EVENT_CLICK_LINK_NOFOLLOW: - { - LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is " << self->getClickURL() << LL_ENDL; - onClickLinkNoFollow(self); - }; - break; - case MEDIA_EVENT_PLUGIN_FAILED: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_PLUGIN_FAILED" << LL_ENDL; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 86336e353c..4620ce6354 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -50,6 +50,7 @@ #include "llcallbacklist.h" #include "llparcel.h" #include "llaudioengine.h" // for gAudiop +#include "llurldispatcher.h" #include "llvoavatar.h" #include "llvoavatarself.h" #include "llviewerregion.h" @@ -2340,6 +2341,14 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla { switch(event) { + case MEDIA_EVENT_CLICK_LINK_NOFOLLOW: + { + LL_DEBUGS("Media") << "MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is: " << plugin->getClickURL() << LL_ENDL; + std::string url = plugin->getClickURL(); + LLURLDispatcher::dispatch(url, NULL, false); + + } + break; case MEDIA_EVENT_PLUGIN_FAILED_LAUNCH: { // The plugin failed to load properly. Make sure the timer doesn't retry. diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 2c5c0a37e8..dbf7fdf20c 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -543,12 +543,6 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent }; break; - case MEDIA_EVENT_CLICK_LINK_NOFOLLOW: - { - LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is " << self->getClickURL() << LL_ENDL; - }; - break; - case MEDIA_EVENT_PLUGIN_FAILED: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_PLUGIN_FAILED" << LL_ENDL; -- cgit v1.2.3 From 2aa9ecb60235c96a42f3719fab9dbc6ea1bf50db Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 8 Mar 2010 17:38:50 -0500 Subject: EXT-5867 : Crash when clicking and dragging root folder of object contents into build floater Simple fix to use dynamic cast - the previous unsafe static cast was treating folders as if they were items and then querying permissions, which don't exist for folders. This code actually existed back in 1.23 but by some stroke of luck worked. --- indra/newview/llpanelobjectinventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5ddbdf7f01..6fcba80845 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -770,8 +770,8 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { - LLInventoryItem* inv = NULL; - if((inv = (LLInventoryItem*)object->getInventoryObject(mUUID))) + const LLInventoryItem *inv = dynamic_cast(object->getInventoryObject(mUUID)); + if (inv) { const LLPermissions& perm = inv->getPermissions(); bool can_copy = gAgent.allowOperation(PERM_COPY, perm, -- cgit v1.2.3 From f39a87ef8384ede25a6597e678ac7609e9e64cc5 Mon Sep 17 00:00:00 2001 From: skolb Date: Mon, 8 Mar 2010 14:54:19 -0800 Subject: https://jira.secondlife.com/browse/EXT-5884 Added code to support SLAPPS for Media on a Prim Reviewed by Monroe and Callum via Code Collab (Review 143). --- indra/newview/llmediactrl.cpp | 16 ++++++---------- indra/newview/llmediactrl.h | 1 - indra/newview/llviewermedia.cpp | 5 +++-- indra/newview/llviewermedia.h | 4 ++++ 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index c244bc38ed..e0069e7438 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -80,8 +80,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mForceUpdate( false ), mOpenLinksInExternalBrowser( false ), mOpenLinksInInternalBrowser( false ), - mTrusted( false ), mHomePageUrl( "" ), + mTrusted(false), mIgnoreUIScale( true ), mAlwaysRefresh( false ), mMediaSource( 0 ), @@ -183,6 +183,10 @@ void LLMediaCtrl::setOpenInInternalBrowser( bool valIn ) //////////////////////////////////////////////////////////////////////////////// void LLMediaCtrl::setTrusted( bool valIn ) { + if(mMediaSource) + { + mMediaSource->setTrustedBrowser(valIn); + } mTrusted = valIn; } @@ -632,6 +636,7 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->setVisible( getVisible() ); mMediaSource->addObserver( this ); mMediaSource->setBackgroundColor( getBackgroundColor() ); + mMediaSource->setTrustedBrowser(mTrusted); if(mClearCache) { mMediaSource->clearCache(); @@ -1055,15 +1060,6 @@ void LLMediaCtrl::clickLinkWithTarget(const std::string& url, const S32& target_ } } -//////////////////////////////////////////////////////////////////////////////// -// -void LLMediaCtrl::onClickLinkNoFollow( LLPluginClassMedia* self ) -{ - // let the dispatcher handle blocking/throttling of SLURLs - std::string url = self->getClickURL(); - LLURLDispatcher::dispatch(url, this, mTrusted); -} - //////////////////////////////////////////////////////////////////////////////// // std::string LLMediaCtrl::getCurrentNavUrl() diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 60e0c4073b..e55d2f7cd0 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -164,7 +164,6 @@ public: // handlers for individual events (could be done inside the switch in handleMediaEvent, they're just individual functions for clarity) void onClickLinkHref( LLPluginClassMedia* self ); - void onClickLinkNoFollow( LLPluginClassMedia* self ); protected: void convertInputCoords(S32& x, S32& y); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 4620ce6354..7e08464cd0 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1091,7 +1091,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mBackgroundColor(LLColor4::white), mNavigateSuspended(false), mNavigateSuspendedDeferred(false), - mIsUpdated(false) + mIsUpdated(false), + mTrustedBrowser(false) { // Set up the mute list observer if it hasn't been set up already. @@ -2345,7 +2346,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla { LL_DEBUGS("Media") << "MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is: " << plugin->getClickURL() << LL_ENDL; std::string url = plugin->getClickURL(); - LLURLDispatcher::dispatch(url, NULL, false); + LLURLDispatcher::dispatch(url, NULL, mTrustedBrowser); } break; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 9dbffa78b3..bc51e713a1 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -322,6 +322,9 @@ public: void setLowPrioritySizeLimit(int size); void setTextureID(LLUUID id = LLUUID::null); + + bool isTrustedBrowser() { return mTrustedBrowser; } + void setTrustedBrowser(bool trusted) { mTrustedBrowser = trusted; } typedef enum { @@ -405,6 +408,7 @@ private: LLColor4 mBackgroundColor; bool mNavigateSuspended; bool mNavigateSuspendedDeferred; + bool mTrustedBrowser; private: BOOL mIsUpdated ; -- cgit v1.2.3 From ab55ab1c8d37fce65c9968f98fa3bf2ed528fd7e Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Mon, 8 Mar 2010 15:18:55 -0800 Subject: EXT-6266 en_xui_change for spinner label widths; undid 'de' local overrides --- indra/newview/skins/default/xui/de/floater_tools.xml | 16 ++++++++-------- indra/newview/skins/default/xui/en/floater_tools.xml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index 4efe0dd7f3..303ca2b883 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -364,14 +364,14 @@ Objekteigenschaften bearbeiten: - - - - - - - - + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index affe74d148..948dbd84e4 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2051,7 +2051,7 @@ even though the user gets a free copy. increment="1" initial_value="2" label="Softness" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="3" @@ -2064,7 +2064,7 @@ even though the user gets a free copy. increment="0.5" initial_value="0.3" label="Gravity" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="10" @@ -2078,7 +2078,7 @@ even though the user gets a free copy. increment="0.5" initial_value="2" label="Drag" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="10" @@ -2091,7 +2091,7 @@ even though the user gets a free copy. increment="0.5" initial_value="0" label="Wind" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="10" @@ -2104,7 +2104,7 @@ even though the user gets a free copy. increment="0.5" initial_value="1" label="Tension" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="10" @@ -2117,7 +2117,7 @@ even though the user gets a free copy. increment="0.01" initial_value="0" label="Force X" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="10" @@ -2131,7 +2131,7 @@ even though the user gets a free copy. increment="0.01" initial_value="0" label="Force Y" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="10" @@ -2145,7 +2145,7 @@ even though the user gets a free copy. increment="0.01" initial_value="0" label="Force Z" - label_width="65" + label_width="70" layout="topleft" left_delta="0" max_val="10" -- cgit v1.2.3 From c1b29dfcc253ebe1323824d31efd2d5db74f405d Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 8 Mar 2010 15:29:28 -0800 Subject: Fix for mac build error "enumeration value 'MEDIA_EVENT_CLICK_LINK_NOFOLLOW' not handled in switch" --- indra/newview/llmediactrl.cpp | 6 ++++++ indra/newview/llviewerparcelmedia.cpp | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index e0069e7438..05cb6ddc4a 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -948,6 +948,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) }; break; + case MEDIA_EVENT_CLICK_LINK_NOFOLLOW: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is " << self->getClickURL() << LL_ENDL; + }; + break; + case MEDIA_EVENT_PLUGIN_FAILED: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_PLUGIN_FAILED" << LL_ENDL; diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index dbf7fdf20c..2c5c0a37e8 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -543,6 +543,12 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent }; break; + case MEDIA_EVENT_CLICK_LINK_NOFOLLOW: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is " << self->getClickURL() << LL_ENDL; + }; + break; + case MEDIA_EVENT_PLUGIN_FAILED: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_PLUGIN_FAILED" << LL_ENDL; -- cgit v1.2.3 From a0c0d552af97d2a7359a1124ad96b98611fef3ca Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Mon, 8 Mar 2010 16:08:43 -0800 Subject: WR-17933 en_xui_change; undid 'de' evil overrides. also, more fix for 'en' floater_tools build menu --- indra/newview/skins/default/xui/de/panel_group_invite.xml | 8 ++++---- indra/newview/skins/default/xui/en/floater_tools.xml | 2 +- indra/newview/skins/default/xui/en/panel_group_invite.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/de/panel_group_invite.xml b/indra/newview/skins/default/xui/de/panel_group_invite.xml index dfc1e26750..4e3a304609 100644 --- a/indra/newview/skins/default/xui/de/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/de/panel_group_invite.xml @@ -9,18 +9,18 @@ Einige der ausgewählten Einwohner sind bereits Gruppenmitglieder und haben aus diesem Grund keine Einladung erhalten. - + Sie können mehrere Einwohner Ihre Gruppe einladen. Klicken Sie hierzu auf „Einwohnerliste öffnen“. -