From f9ef8fc4b3545f2ea64e5be31e923de722cfeec5 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Tue, 24 Nov 2009 20:19:33 -0500 Subject: EXT-2764 EXT-2766 add and remove help ids to reflect reality --- indra/newview/skins/default/xui/en/floater_about_land.xml | 1 - indra/newview/skins/default/xui/en/floater_preferences.xml | 1 - indra/newview/skins/default/xui/en/floater_water.xml | 1 - indra/newview/skins/default/xui/en/panel_region_covenant.xml | 1 + indra/newview/skins/default/xui/en/panel_region_debug.xml | 1 + indra/newview/skins/default/xui/en/panel_region_estate.xml | 1 + indra/newview/skins/default/xui/en/panel_region_general.xml | 1 + indra/newview/skins/default/xui/en/panel_region_terrain.xml | 1 + indra/newview/skins/default/xui/en/panel_region_texture.xml | 1 + 9 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 4f1024f56d..3d39f9e3b1 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -4,7 +4,6 @@ height="420" layout="topleft" name="floaterland" - help_topic="floaterland" save_rect="true" title="ABOUT LAND" width="460"> diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index d182cdc6bb..088b1050d9 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -7,7 +7,6 @@ height="460" layout="topleft" name="Preferences" - help_topic="preferences" single_instance="true" title="PREFERENCES" width="620"> diff --git a/indra/newview/skins/default/xui/en/floater_water.xml b/indra/newview/skins/default/xui/en/floater_water.xml index b13a11c05d..103f96a651 100644 --- a/indra/newview/skins/default/xui/en/floater_water.xml +++ b/indra/newview/skins/default/xui/en/floater_water.xml @@ -4,7 +4,6 @@ height="240" layout="topleft" name="Water Floater" - help_topic="water_floater" save_rect="true" title="ADVANCED WATER EDITOR" width="700"> diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml index 75d7d85505..ff55090f16 100644 --- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml +++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_covenant_tab" label="Covenant" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml index e07585d285..a6b4ddd01e 100644 --- a/indra/newview/skins/default/xui/en/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_debug_tab" label="Debug" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index e25ff0d548..43036ca70e 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -3,6 +3,7 @@ border="false" follows="top|left" height="320" + help_topic="panel_region_estate_tab" label="Estate" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 42c6319699..88277a2f10 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_general_tab" label="Region" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml index ffd51bf510..5093c52129 100644 --- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_terrain_tab" label="Terrain" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_texture.xml b/indra/newview/skins/default/xui/en/panel_region_texture.xml index 5089064c07..a4d24cb0fc 100644 --- a/indra/newview/skins/default/xui/en/panel_region_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_region_texture.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_texture_tab" label="Ground Textures" layout="topleft" left="0" -- cgit v1.2.3 From 8e31171ee3e5ecfff5f0e5edddcd19cb8e36473f Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Tue, 8 Dec 2009 16:49:47 -0800 Subject: DEV-43866: Fix mute button when you slide volume slider Trivial fix, plus some minor refactoring --- indra/newview/llpanelprimmediacontrols.cpp | 136 ++++++++++----------- indra/newview/llpanelprimmediacontrols.h | 2 +- .../default/xui/en/panel_prim_media_controls.xml | 2 +- 3 files changed, 70 insertions(+), 70 deletions(-) diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index aa2b7d4554..b4cc1b78ad 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -150,7 +150,7 @@ BOOL LLPanelPrimMediaControls::postBuild() mSkipFwdCtrl = getChild("skip_forward"); mSkipBackCtrl = getChild("skip_back"); mVolumeCtrl = getChild("media_volume"); - mVolumeBtn = getChild("media_volume_button"); + mMuteBtn = getChild("media_mute_button"); mVolumeUpCtrl = getChild("volume_up"); mVolumeDownCtrl = getChild("volume_down"); mVolumeSliderCtrl = getChild("volume_slider"); @@ -308,13 +308,12 @@ void LLPanelPrimMediaControls::updateShape() enabled = dynamic_cast(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL); mini_controls = (LLMediaEntry::MINI == media_data->getControls()); } - const bool is_hud = objectp->isHUDAttachment(); // // Set the state of the buttons // - + // XXX RSP: TODO: FIXME: clean this up so that it is clearer what mode we are in, // and that only the proper controls get made visible/enabled according to that mode. mBackCtrl->setVisible(has_focus); @@ -343,7 +342,7 @@ void LLPanelPrimMediaControls::updateShape() mStopCtrl->setEnabled(has_focus && can_navigate); mHomeCtrl->setEnabled(has_focus && can_navigate); LLPluginClassMediaOwner::EMediaStatus result = ((media_impl != NULL) && media_impl->hasMedia()) ? media_plugin->getStatus() : LLPluginClassMediaOwner::MEDIA_NONE; - + if(media_plugin && media_plugin->pluginSupportsMediaTime()) { mReloadCtrl->setEnabled(false); @@ -360,14 +359,14 @@ void LLPanelPrimMediaControls::updateShape() mSkipFwdCtrl->setEnabled(has_focus && !mini_controls); mSkipBackCtrl->setVisible(has_focus && !mini_controls); mSkipBackCtrl->setEnabled(has_focus && !mini_controls); - + mVolumeCtrl->setVisible(has_focus); mVolumeUpCtrl->setVisible(has_focus); mVolumeDownCtrl->setVisible(has_focus); mVolumeCtrl->setEnabled(has_focus); mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible); mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible); - + mWhitelistIcon->setVisible(false); mSecureLockIcon->setVisible(false); if (mMediaPanelScroll) @@ -378,7 +377,7 @@ void LLPanelPrimMediaControls::updateShape() mScrollRightCtrl->setVisible(false); mScrollDownCtrl->setVisible(false); } - + F32 volume = media_impl->getVolume(); // movie's url changed if(mCurrentURL!=mPreviousURL) @@ -386,7 +385,7 @@ void LLPanelPrimMediaControls::updateShape() mMovieDuration = media_plugin->getDuration(); mPreviousURL = mCurrentURL; } - + if(mMovieDuration == 0) { mMovieDuration = media_plugin->getDuration(); @@ -394,7 +393,7 @@ void LLPanelPrimMediaControls::updateShape() mMediaPlaySliderCtrl->setEnabled(false); } // TODO: What if it's not fully loaded - + if(mUpdateSlider && mMovieDuration!= 0) { F64 current_time = media_plugin->getCurrentTime(); @@ -402,29 +401,30 @@ void LLPanelPrimMediaControls::updateShape() mMediaPlaySliderCtrl->setValue(percent); mMediaPlaySliderCtrl->setEnabled(true); } - + // video vloume if(volume <= 0.0) { mVolumeUpCtrl->setEnabled(TRUE); mVolumeDownCtrl->setEnabled(FALSE); media_impl->setVolume(0.0); - mVolumeBtn->setToggleState(true); + mMuteBtn->setToggleState(true); } else if (volume >= 1.0) { mVolumeUpCtrl->setEnabled(FALSE); mVolumeDownCtrl->setEnabled(TRUE); media_impl->setVolume(1.0); - mVolumeBtn->setToggleState(false); + mMuteBtn->setToggleState(false); } else { + mMuteBtn->setToggleState(false); mVolumeUpCtrl->setEnabled(TRUE); mVolumeDownCtrl->setEnabled(TRUE); } mVolumeSliderCtrl->setValue(volume); - + switch(result) { case LLPluginClassMediaOwner::MEDIA_PLAYING: @@ -453,7 +453,7 @@ void LLPanelPrimMediaControls::updateShape() { mCurrentURL.clear(); } - + mPlayCtrl->setVisible(FALSE); mPauseCtrl->setVisible(FALSE); mMediaStopCtrl->setVisible(FALSE); @@ -465,7 +465,7 @@ void LLPanelPrimMediaControls::updateShape() mSkipFwdCtrl->setEnabled(FALSE); mSkipBackCtrl->setVisible(FALSE); mSkipBackCtrl->setEnabled(FALSE); - + mVolumeCtrl->setVisible(FALSE); mVolumeUpCtrl->setVisible(FALSE); mVolumeDownCtrl->setVisible(FALSE); @@ -491,13 +491,13 @@ void LLPanelPrimMediaControls::updateShape() { mSecureLockIcon->setVisible(has_focus); } - + if(mCurrentURL!=mPreviousURL) { setCurrentURL(); mPreviousURL = mCurrentURL; } - + if(result == LLPluginClassMediaOwner::MEDIA_LOADING) { mReloadCtrl->setEnabled(FALSE); @@ -513,7 +513,7 @@ void LLPanelPrimMediaControls::updateShape() mStopCtrl->setVisible(FALSE); } } - + if(media_plugin) { @@ -530,7 +530,7 @@ void LLPanelPrimMediaControls::updateShape() mMediaProgressPanel->setVisible(false); } } - + if(media_impl) { // @@ -538,28 +538,28 @@ void LLPanelPrimMediaControls::updateShape() // switch (mScrollState) { - case SCROLL_UP: - media_impl->scrollWheel(0, -1, MASK_NONE); - break; - case SCROLL_DOWN: - media_impl->scrollWheel(0, 1, MASK_NONE); - break; - case SCROLL_LEFT: - media_impl->scrollWheel(1, 0, MASK_NONE); -// media_impl->handleKeyHere(KEY_LEFT, MASK_NONE); - break; - case SCROLL_RIGHT: - media_impl->scrollWheel(-1, 0, MASK_NONE); -// media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE); - break; - case SCROLL_NONE: - default: - break; + case SCROLL_UP: + media_impl->scrollWheel(0, -1, MASK_NONE); + break; + case SCROLL_DOWN: + media_impl->scrollWheel(0, 1, MASK_NONE); + break; + case SCROLL_LEFT: + media_impl->scrollWheel(1, 0, MASK_NONE); + // media_impl->handleKeyHere(KEY_LEFT, MASK_NONE); + break; + case SCROLL_RIGHT: + media_impl->scrollWheel(-1, 0, MASK_NONE); + // media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE); + break; + case SCROLL_NONE: + default: + break; } } setVisible(enabled); - + // // Calculate position and shape of the controls // @@ -569,31 +569,31 @@ void LLPanelPrimMediaControls::updateShape() std::vector::iterator vert_it; std::vector::iterator vert_end; std::vector vect_face; - + LLVolume* volume = objectp->getVolume(); - + if (volume) { const LLVolumeFace& vf = volume->getVolumeFace(mTargetObjectFace); - + const LLVector3* ext = vf.mExtents; - + LLVector3 center = (ext[0]+ext[1])*0.5f; LLVector3 size = (ext[1]-ext[0])*0.5f; LLVector3 vert[] = - { - center + size.scaledVec(LLVector3(1,1,1)), - center + size.scaledVec(LLVector3(-1,1,1)), - center + size.scaledVec(LLVector3(1,-1,1)), - center + size.scaledVec(LLVector3(-1,-1,1)), - center + size.scaledVec(LLVector3(1,1,-1)), - center + size.scaledVec(LLVector3(-1,1,-1)), - center + size.scaledVec(LLVector3(1,-1,-1)), - center + size.scaledVec(LLVector3(-1,-1,-1)), - }; - + { + center + size.scaledVec(LLVector3(1,1,1)), + center + size.scaledVec(LLVector3(-1,1,1)), + center + size.scaledVec(LLVector3(1,-1,1)), + center + size.scaledVec(LLVector3(-1,-1,1)), + center + size.scaledVec(LLVector3(1,1,-1)), + center + size.scaledVec(LLVector3(-1,1,-1)), + center + size.scaledVec(LLVector3(1,-1,-1)), + center + size.scaledVec(LLVector3(-1,-1,-1)), + }; + LLVOVolume* vo = (LLVOVolume*) objectp; - + for (U32 i = 0; i < 8; i++) { vect_face.push_back(vo->volumePositionToAgent(vert[i])); @@ -601,7 +601,7 @@ void LLPanelPrimMediaControls::updateShape() } vert_it = vect_face.begin(); vert_end = vect_face.end(); - + min = LLVector3(1,1,1); max = LLVector3(-1,-1,-1); for(; vert_it != vert_end; ++vert_it) @@ -609,19 +609,19 @@ void LLPanelPrimMediaControls::updateShape() // project silhouette vertices into screen space glh::vec3f screen_vert = glh::vec3f(vert_it->mV); mat.mult_matrix_vec(screen_vert); - + // add to screenspace bounding box update_min_max(min, max, LLVector3(screen_vert.v)); } - + LLCoordGL screen_min; screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidthScaled() * (min.mV[VX] + 1.f) * 0.5f); screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeightScaled() * (min.mV[VY] + 1.f) * 0.5f); - + LLCoordGL screen_max; screen_max.mX = llround((F32)gViewerWindow->getWorldViewWidthScaled() * (max.mV[VX] + 1.f) * 0.5f); screen_max.mY = llround((F32)gViewerWindow->getWorldViewHeightScaled() * (max.mV[VY] + 1.f) * 0.5f); - + // grow panel so that screenspace bounding box fits inside "media_region" element of HUD LLRect media_controls_rect; S32 volume_slider_height = mVolumeSliderCtrl->getRect().getHeight() - /*fudge*/ 2; @@ -636,19 +636,19 @@ void LLPanelPrimMediaControls::updateShape() // clamp to minimum size, keeping centered media_controls_rect.setCenterAndSize(media_controls_rect.getCenterX(), media_controls_rect.getCenterY(), - llmax(mMinWidth, media_controls_rect.getWidth()), llmax(mMinHeight, media_controls_rect.getHeight())); - + llmax(mMinWidth, media_controls_rect.getWidth()), llmax(mMinHeight, media_controls_rect.getHeight())); + setShape(media_controls_rect, true); - + // Test mouse position to see if the cursor is stationary LLCoordWindow cursor_pos_window; getWindow()->getCursorPosition(&cursor_pos_window); - + // If last pos is not equal to current pos, the mouse has moved // We need to reset the timer, and make sure the panel is visible if(cursor_pos_window.mX != mLastCursorPos.mX || - cursor_pos_window.mY != mLastCursorPos.mY || - mScrollState != SCROLL_NONE) + cursor_pos_window.mY != mLastCursorPos.mY || + mScrollState != SCROLL_NONE) { mInactivityTimer.start(); mLastCursorPos = cursor_pos_window; @@ -673,7 +673,7 @@ void LLPanelPrimMediaControls::updateShape() else { // I don't think this is correct anymore. This is done in draw() after the fade has completed. -// setVisible(FALSE); + // setVisible(FALSE); } } } @@ -1193,7 +1193,7 @@ void LLPanelPrimMediaControls::onCommitVolumeUp() } media_impl->setVolume(volume); - mVolumeBtn->setToggleState(false); + mMuteBtn->setToggleState(false); } } @@ -1213,7 +1213,7 @@ void LLPanelPrimMediaControls::onCommitVolumeDown() } media_impl->setVolume(volume); - mVolumeBtn->setToggleState(false); + mMuteBtn->setToggleState(false); } } @@ -1243,7 +1243,7 @@ void LLPanelPrimMediaControls::onToggleMute() } else { - media_impl->setVolume(0.5); + media_impl->setVolume(mVolumeSliderCtrl->getValueF32()); } } } diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 06163051a5..17e65b8b0c 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -153,7 +153,7 @@ private: LLUICtrl *mMediaPlaySliderPanel; LLUICtrl *mMediaPlaySliderCtrl; LLUICtrl *mVolumeCtrl; - LLButton *mVolumeBtn; + LLButton *mMuteBtn; LLUICtrl *mVolumeUpCtrl; LLUICtrl *mVolumeDownCtrl; LLSliderCtrl *mVolumeSliderCtrl; diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index e21de31498..b4f72a48bc 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -380,7 +380,7 @@ image_selected="AudioMute_Off" image_unselected="Audio_Off" hover_glow_amount="0.15" - name="media_volume_button" + name="media_mute_button" height="22" is_toggle="true" layout="topleft" -- cgit v1.2.3 From b37fab7a5d5a6eedf8567a3f2704b36c98a2645d Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 8 Dec 2009 17:25:00 -0800 Subject: Web teams needs us to support 403 response codes for some trickery they are doing with Help pages. --- indra/newview/llviewermedia.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 952de00272..585ac4f8e9 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -172,6 +172,11 @@ public: completeAny(status, "text/html"); } else + if(status == 403) + { + completeAny(status, "text/html"); + } + else if(status == 404) { // 404 is content not found - sites often have bespoke 404 pages so -- cgit v1.2.3 From ce18034e6544364e39aef0ac1a315b7e9e5770fa Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 8 Dec 2009 18:17:32 -0800 Subject: Performance improvements for the nearby media floater when lots of media is present. Added LLViewerMediaImpl::mInNearbyMediaList for LLFloaterNearbyMedia::refreshList() to use to keep track of which elements it's seen -- this allows us to remove a linear search in an inner loop. Added a map from texture ID to media impl pointer in LLViewerMedia/LLViewerMediaImpl. This allows LLViewerMedia::getMediaImplFromTextureID() to be a std::map lookup instead of a linear search. In LLFloaterNearbyMedia, call sortByColumnIndex in postBuild instead of in addMediaItem(). The latter was causing some unnecessary re-sorting. Hf: Enter commit message. Lines beginning with 'HG:' are removed. --- indra/newview/llviewermedia.cpp | 46 ++++++++++++++++++++++++++++++----------- indra/newview/llviewermedia.h | 5 +++++ 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 585ac4f8e9..0aae1a093d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -245,6 +245,7 @@ public: bool mInitialized; }; static LLViewerMedia::impl_list sViewerMediaImplList; +static LLViewerMedia::impl_id_map sViewerMediaTextureIDMap; static LLTimer sMediaCreateTimer; static const F32 LLVIEWERMEDIA_CREATE_DELAY = 1.0f; static F32 sGlobalVolume = 1.0f; @@ -302,7 +303,7 @@ viewer_media_t LLViewerMedia::newMediaImpl( else { media_impl->unload(); - media_impl->mTextureId = texture_id; + media_impl->setTextureID(texture_id); media_impl->mMediaWidth = media_width; media_impl->mMediaHeight = media_height; media_impl->mMediaAutoScale = media_auto_scale; @@ -417,18 +418,16 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // static LLViewerMediaImpl* LLViewerMedia::getMediaImplFromTextureID(const LLUUID& texture_id) { - impl_list::iterator iter = sViewerMediaImplList.begin(); - impl_list::iterator end = sViewerMediaImplList.end(); - - for(; iter != end; iter++) + LLViewerMediaImpl* result = NULL; + + // Look up the texture ID in the texture id->impl map. + impl_id_map::iterator iter = sViewerMediaTextureIDMap.find(texture_id); + if(iter != sViewerMediaTextureIDMap.end()) { - LLViewerMediaImpl* media_impl = *iter; - if(media_impl->getMediaTextureID() == texture_id) - { - return media_impl; - } + result = iter->second; } - return NULL; + + return result; } ////////////////////////////////////////////////////////////////////////////////////////// @@ -832,7 +831,6 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, : mMediaSource( NULL ), mMovieImageHasMips(false), - mTextureId(texture_id), mMediaWidth(media_width), mMediaHeight(media_height), mMediaAutoScale(media_auto_scale), @@ -862,6 +860,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mProximityDistance(0.0f), mMimeTypeProbe(NULL), mMediaAutoPlay(false), + mInNearbyMediaList(false), mIsUpdated(false) { @@ -873,6 +872,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, } add_media_impl(this); + + setTextureID(texture_id); // connect this media_impl to the media texture, creating it if it doesn't exist.0 // This is necessary because we need to be able to use getMaxVirtualSize() even if the media plugin is not loaded. @@ -896,6 +897,7 @@ LLViewerMediaImpl::~LLViewerMediaImpl() LLViewerMediaTexture::removeMediaImplFromTexture(mTextureId) ; + setTextureID(); remove_media_impl(this); } @@ -2427,6 +2429,26 @@ LLVOVolume *LLViewerMediaImpl::getSomeObject() return result; } +void LLViewerMediaImpl::setTextureID(LLUUID id) +{ + if(id != mTextureId) + { + if(mTextureId.notNull()) + { + // Remove this item's entry from the map + sViewerMediaTextureIDMap.erase(mTextureId); + } + + if(id.notNull()) + { + sViewerMediaTextureIDMap.insert(LLViewerMedia::impl_id_map::value_type(id, this)); + } + + mTextureId = id; + } +} + + ////////////////////////////////////////////////////////////////////////////////////////// //static void LLViewerMedia::toggleMusicPlay(void*) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 713eb2710b..349a66867a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -79,6 +79,8 @@ class LLViewerMedia typedef std::vector impl_list; + typedef std::map impl_id_map; + // Special case early init for just web browser component // so we can show login screen. See .cpp file for details. JC @@ -287,6 +289,8 @@ public: LLPluginClassMedia::EPriority getPriority() { return mPriority; }; void setLowPrioritySizeLimit(int size); + + void setTextureID(LLUUID id = LLUUID::null); typedef enum { @@ -348,6 +352,7 @@ public: LLMimeDiscoveryResponder *mMimeTypeProbe; bool mMediaAutoPlay; std::string mMediaEntryURL; + bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons private: BOOL mIsUpdated ; -- cgit v1.2.3 From 75a5f3c52ea6d7df23251991d658baccf3771fa0 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 9 Dec 2009 11:30:28 -0800 Subject: Follow-up to previous change: slider control should only be set when focus changes --- indra/newview/llpanelprimmediacontrols.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index b4cc1b78ad..3fe51106e4 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -200,7 +200,7 @@ BOOL LLPanelPrimMediaControls::postBuild() mScrollDownCtrl->setHeldDownCallback(onScrollDownHeld, this); mScrollDownCtrl->setMouseUpCallback(onScrollStop, this); } - + mMediaAddress->setFocusReceivedCallback(boost::bind(&LLPanelPrimMediaControls::onInputURL, _1, this )); mInactiveTimeout = gSavedSettings.getF32("MediaControlTimeout"); mControlFadeTime = gSavedSettings.getF32("MediaControlFadeTime"); @@ -215,11 +215,15 @@ void LLPanelPrimMediaControls::setMediaFace(LLPointer objectp, S { if (media_impl.notNull() && objectp.notNull()) { + LLUUID prev_id = mTargetImplID; mTargetImplID = media_impl->getMediaTextureID(); mTargetObjectID = objectp->getID(); mTargetObjectFace = face; mTargetObjectNormal = pick_normal; mClearFaceOnFade = false; + + if (prev_id != mTargetImplID) + mVolumeSliderCtrl->setValue(media_impl->getVolume()); } else { @@ -407,14 +411,12 @@ void LLPanelPrimMediaControls::updateShape() { mVolumeUpCtrl->setEnabled(TRUE); mVolumeDownCtrl->setEnabled(FALSE); - media_impl->setVolume(0.0); mMuteBtn->setToggleState(true); } else if (volume >= 1.0) { mVolumeUpCtrl->setEnabled(FALSE); mVolumeDownCtrl->setEnabled(TRUE); - media_impl->setVolume(1.0); mMuteBtn->setToggleState(false); } else @@ -423,7 +425,6 @@ void LLPanelPrimMediaControls::updateShape() mVolumeUpCtrl->setEnabled(TRUE); mVolumeDownCtrl->setEnabled(TRUE); } - mVolumeSliderCtrl->setValue(volume); switch(result) { -- cgit v1.2.3 From 0bf7917ae848388a3e1bc6ad13e300880fed12d0 Mon Sep 17 00:00:00 2001 From: "bea@american.lindenlab.com" Date: Wed, 9 Dec 2009 12:52:27 -0800 Subject: Added Doxygen comments --- indra/llplugin/llpluginsharedmemory.cpp | 12 +++++++- indra/llplugin/llpluginsharedmemory.h | 53 +++++++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 3 deletions(-) diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index 3c69a69d28..9c18b410c7 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -1,6 +1,6 @@ /** * @file llpluginsharedmemory.cpp - * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. + * LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. * * @cond * $LicenseInfo:firstyear=2008&license=viewergpl$ @@ -96,6 +96,10 @@ std::string LLPluginSharedMemory::createName(void) return newname.str(); } +/** + * @brief LLPluginSharedMemoryImpl is the platform-dependent implementation of LLPluginSharedMemory. TODO:DOC is this necessary/sufficient? kinda obvious. + * + */ class LLPluginSharedMemoryPlatformImpl { public: @@ -112,6 +116,9 @@ public: }; +/** + * Constructor. Creates a shared memory segment. + */ LLPluginSharedMemory::LLPluginSharedMemory() { mSize = 0; @@ -121,6 +128,9 @@ LLPluginSharedMemory::LLPluginSharedMemory() mImpl = new LLPluginSharedMemoryPlatformImpl; } +/** + * Destructor. Uses destroy() and detach() to ensure shared memory segment is cleaned up. + */ LLPluginSharedMemory::~LLPluginSharedMemory() { if(mNeedsDestroy) diff --git a/indra/llplugin/llpluginsharedmemory.h b/indra/llplugin/llpluginsharedmemory.h index 4014620c52..00c54ef08c 100644 --- a/indra/llplugin/llpluginsharedmemory.h +++ b/indra/llplugin/llpluginsharedmemory.h @@ -1,6 +1,5 @@ /** * @file llpluginsharedmemory.h - * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. * * @cond * $LicenseInfo:firstyear=2008&license=viewergpl$ @@ -36,6 +35,10 @@ class LLPluginSharedMemoryPlatformImpl; +/** + * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. + * + */ class LLPluginSharedMemory { LOG_CLASS(LLPluginSharedMemory); @@ -46,16 +49,62 @@ public: // Parent will use create/destroy, child will use attach/detach. // Message transactions will ensure child attaches after parent creates and detaches before parent destroys. - // create() implicitly creates a name for the segment which is guaranteed to be unique on the host at the current time. + /** + * Creates a shared memory segment, with a name which is guaranteed to be unique on the host at the current time. Used by parent. + * Message transactions will (? TODO:DOC - should? must?) ensure child attaches after parent creates and detaches before parent destroys. + * + * @param[in] size Shared memory size in TODO:DOC units = bytes?. + * + * @return False for failure, true for success. + */ bool create(size_t size); + /** + * Destroys a shared memory segment. Used by parent. + * Message transactions will (? TODO:DOC - should? must?) ensure child attaches after parent creates and detaches before parent destroys. + * + * @return True. TODO:DOC - always returns true. Is this the intended behavior? + */ bool destroy(void); + /** + * Creates and attaches a name to a shared memory segment. TODO:DOC what's the difference between attach() and create()? + * + * @param[in] name Name to attach to memory segment + * @param[in] size Size of memory segment TODO:DOC in bytes? + * + * @return False on failure, true otherwise. + */ bool attach(const std::string &name, size_t size); + /** + * Detaches shared memory segment. + * + * @return False on failure, true otherwise. + */ bool detach(void); + /** + * Checks if shared memory is mapped to a non-null address. + * + * @return True if memory address is non-null, false otherwise. + */ bool isMapped(void) const { return (mMappedAddress != NULL); }; + /** + * Get pointer to shared memory. + * + * @return Pointer to shared memory. + */ void *getMappedAddress(void) const { return mMappedAddress; }; + /** + * Get size of shared memory. + * + * @return Size of shared memory in bytes. TODO:DOC are bytes the correct unit? + */ size_t getSize(void) const { return mSize; }; + /** + * Get name of shared memory. + * + * @return Name of shared memory. + */ std::string getName() const { return mName; }; private: -- cgit v1.2.3 From dc3cad90c1cd4490d8035832138579f9711f8549 Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 9 Dec 2009 14:55:17 -0800 Subject: Bunch of simple UI changes: DEV-43885 EXT-3206: Number of media items UI in Nearby Media Floater clipped when there are a lot DEV-43884 EXT-3207: In Build Dialog, Under Texture Tab, should say "Media" and not "Media URL" DEV-43877 EXT-3221: Warning message about whitelists in Security Tab of Media settings floater appears incorrectly DEV-43875 EXT-3224: Media Text Box in the Build settings: Texture should be a label and not a text box DEV-43477 Popup for adding media to only one face is misleading Reviewed by Sam --- indra/newview/llfloatertools.cpp | 20 ++------------------ indra/newview/llpanelmediasettingsgeneral.cpp | 9 +++++++-- indra/newview/llpanelmediasettingsgeneral.h | 2 +- indra/newview/llpanelmediasettingssecurity.cpp | 3 +++ indra/newview/skins/default/xui/en/floater_tools.xml | 5 ++--- indra/newview/skins/default/xui/en/notifications.xml | 2 +- .../default/xui/en/panel_media_settings_general.xml | 2 +- 7 files changed, 17 insertions(+), 26 deletions(-) diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 6ba032c152..317399ad8b 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1080,7 +1080,7 @@ void LLFloaterTools::getMediaState() { LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); LLViewerObject* first_object = selected_objects->getFirstObject(); - LLLineEditor* media_info = getChild("media_info"); + LLTextBox* media_info = getChild("media_info"); if( !(first_object && first_object->getPCode() == LL_PCODE_VOLUME @@ -1088,12 +1088,6 @@ void LLFloaterTools::getMediaState() )) { childSetEnabled("Add_Media", FALSE); -/* childSetEnabled("media_tex", FALSE); - childSetEnabled("add_media", FALSE); - childSetEnabled("delete_media", FALSE); - childSetEnabled("edit_media", FALSE); - childSetEnabled("media_info", FALSE); - media_info->setEnabled(FALSE);*/ media_info->clear(); clearMediaSettings(); return; @@ -1105,13 +1099,6 @@ void LLFloaterTools::getMediaState() if(!has_media_capability) { childSetEnabled("Add_Media", FALSE); - /* childSetEnabled("media_tex", FALSE); - childSetEnabled("add_media", FALSE); - childSetEnabled("delete_media", FALSE); - childSetEnabled("edit_media", FALSE); - childSetEnabled("media_info", FALSE); - media_info->setEnabled(FALSE); - media_info->clear();*/ LL_WARNS("LLFloaterTools: media") << "Media not enabled (no capability) in this region!" << LL_ENDL; clearMediaSettings(); return; @@ -1233,7 +1220,6 @@ void LLFloaterTools::getMediaState() childSetEnabled( "edit_media", bool_has_media & editable ); childSetEnabled( "delete_media", bool_has_media & editable ); childSetEnabled( "add_media", ( ! bool_has_media ) & editable ); - media_info->setEnabled(false); // TODO: display a list of all media on the face - use 'identical' flag } else // not all face has media but at least one does. @@ -1260,8 +1246,6 @@ void LLFloaterTools::getMediaState() } } - media_info->setEnabled(false); - media_info->setTentative(true); childSetEnabled("media_tex", TRUE); childSetEnabled( "edit_media", TRUE); childSetEnabled( "delete_media", TRUE); @@ -1392,7 +1376,7 @@ void LLFloaterTools::updateMediaTitle() if ( ! media_title.empty() ) { // update the UI widget - LLLineEditor* media_title_field = getChild("media_info"); + LLTextBox* media_title_field = getChild("media_info"); if ( media_title_field ) { media_title_field->setText( media_title ); diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 3fa0e7bf8f..88eba14553 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -94,7 +94,7 @@ BOOL LLPanelMediaSettingsGeneral::postBuild() mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY ); mAutoZoom = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_ZOOM_KEY ); mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY ); - mCurrentURL = getChild< LLLineEditor >( LLMediaEntry::CURRENT_URL_KEY ); + mCurrentURL = getChild< LLTextBox >( LLMediaEntry::CURRENT_URL_KEY ); mFirstClick = getChild< LLCheckBoxCtrl >( LLMediaEntry::FIRST_CLICK_INTERACT_KEY ); mHeightPixels = getChild< LLSpinCtrl >( LLMediaEntry::HEIGHT_PIXELS_KEY ); mHomeURL = getChild< LLLineEditor >( LLMediaEntry::HOME_URL_KEY ); @@ -284,7 +284,7 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ { LLMediaEntry::AUTO_SCALE_KEY, self->mAutoScale, "LLCheckBoxCtrl" }, { LLMediaEntry::AUTO_ZOOM_KEY, self->mAutoZoom, "LLCheckBoxCtrl" }, { LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" }, - { LLMediaEntry::CURRENT_URL_KEY, self->mCurrentURL, "LLLineEditor" }, + { LLMediaEntry::CURRENT_URL_KEY, self->mCurrentURL, "LLTextBox" }, { LLMediaEntry::HEIGHT_PIXELS_KEY, self->mHeightPixels, "LLSpinCtrl" }, { LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" }, { LLMediaEntry::FIRST_CLICK_INTERACT_KEY, self->mFirstClick, "LLCheckBoxCtrl" }, @@ -518,4 +518,9 @@ void LLPanelMediaSettingsGeneral::updateCurrentUrl() bool identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func_current_url, value_str ); mCurrentURL->setText(value_str); mCurrentURL->setTentative(identical); + + if ( LLPanelMediaSettingsGeneral::isMultiple() ) + { + mCurrentURL->setText(LLTrans::getString("Multiple Media")); + } } diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index 7782b25d63..c6895b1dc9 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -99,7 +99,7 @@ private: LLSpinCtrl* mWidthPixels; LLSpinCtrl* mHeightPixels; LLLineEditor* mHomeURL; - LLLineEditor* mCurrentURL; + LLTextBox* mCurrentURL; LLMediaCtrl* mPreviewMedia; LLTextBox* mFailWhiteListText; }; diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index d87c7608d5..aea6b0aa3b 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -167,6 +167,9 @@ void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() ); }; }; + + // initial update - hides/shows status messages etc. + self->updateWhitelistEnableStatus(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index e3851de8e7..5e68850e30 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2669,16 +2669,15 @@ even though the user gets a free copy. top_pad="5" name="media_tex" width="260"> - Media URL + Media -