diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-19 14:14:41 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-19 14:14:41 -0800 |
commit | 6a1a8210932bc84da34f60b4ee9c28bfe9d77b08 (patch) | |
tree | 9f92db15d665f9b23b11c20bfd4e8b3b00150527 /indra/newview | |
parent | fe5b3662cb13a2513205e47c93a76ed44084edc7 (diff) | |
parent | 60f4808ede9a085e7a87ef5a1176eb523cfc67d5 (diff) |
merge!
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatermediasettings.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llfloatertools.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewermedia.h | 1 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 10 |
5 files changed, 38 insertions, 5 deletions
diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 5cfd56193e..976af121ae 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -192,6 +192,9 @@ void LLFloaterMediaSettings::initValues( const LLSD& media_settings, bool editab sInstance->mPanelMediaSettingsGeneral->getValues( sInstance->mInitialValues ); sInstance->mPanelMediaSettingsSecurity->getValues( sInstance->mInitialValues ); sInstance->mPanelMediaSettingsPermissions->getValues( sInstance->mInitialValues ); + + sInstance->mApplyBtn->setEnabled(editable); + sInstance->mOKBtn->setEnabled(editable); } //////////////////////////////////////////////////////////////////////////////// @@ -266,8 +269,11 @@ const std::string LLFloaterMediaSettings::getHomeUrl() // virtual void LLFloaterMediaSettings::draw() { - // Set the enabled state of the "Apply" button if values changed - childSetEnabled( "Apply", haveValuesChanged() ); + if (NULL != mApplyBtn) + { + // Set the enabled state of the "Apply" button if values changed + mApplyBtn->setEnabled( haveValuesChanged() ); + } LLFloater::draw(); } diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 1287e14961..241497aeaf 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1134,7 +1134,8 @@ void LLFloaterTools::getMediaState() } // XXX DISABLE this for now, because when the fetch finally // does come in, the state of this floater doesn't properly - // update. This needs more thought. + // update. Re-selecting fixes the problem, but there is + // contention as to whether this is a sufficient solution. // if (object->isMediaDataBeingFetched()) // { // LL_INFOS("LLFloaterTools: media") diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ef596f9297..04d67fe750 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1246,7 +1246,24 @@ void LLViewerMediaImpl::loadURI() { if(mMediaSource) { - mMediaSource->loadURI( mMediaURL ); + // *HACK: we don't know if the URI coming in is properly escaped + // (the contract doesn't specify whether it is escaped or not. + // but LLQtWebKit expects it to be, so we do our best to encode + // special characters) + // The strings below were taken right from http://www.ietf.org/rfc/rfc1738.txt + // Note especially that '%' and '/' are there. + std::string uri = LLURI::escape(mMediaURL, + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789" + "$-_.+" + "!*'()," + "{}|\\^~[]`" + "<>#%" + ";/?:@&=", + false); + llinfos << "Asking media source to load URI: " << uri << llendl; + + mMediaSource->loadURI( uri ); if(mPreviousMediaState == MEDIA_PLAYING) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 668f3b563d..ff18ed605a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -330,6 +330,7 @@ public: bool isNavigateSuspended() { return mNavigateSuspended; }; void cancelMimeTypeProbe(); + private: // a single media url with some data and an impl. LLPluginClassMedia* mMediaSource; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d23bcf9006..d5dd19e470 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2116,11 +2116,19 @@ viewer_media_t LLVOVolume::getMediaImpl(U8 face_id) const F64 LLVOVolume::getTotalMediaInterest() const { + // If this object is currently focused, this object has "high" interest if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == getID()) return F64_MAX; F64 interest = (F64)-1.0; // means not interested; - int i = 0; + + // If this object is selected, this object has "high" interest, but since + // there can be more than one, we still add in calculated impl interest + // XXX Sadly, 'contains()' doesn't take a const :( + if (LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this))) + interest = F64_MAX / 2.0; + + int i = 0; const int end = getNumTEs(); for ( ; i < end; ++i) { |