From 361a2277733a0afaf61f6c6150f1933d2e5aceb7 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 29 Oct 2009 16:12:12 -0600 Subject: fix EXT-1661: Avatars' icons should be cached only once per 24 hours, but not every time the viewer is restarted. to be reviewed by steve. --- indra/newview/llavatariconctrl.cpp | 3 ++- indra/newview/llviewertexture.cpp | 48 +++++++++++++++++++++++++++++--------- indra/newview/llviewertexture.h | 10 ++++---- 3 files changed, 45 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index ebcda13dd4..b56e8d1ec2 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -155,6 +155,8 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) mPriority = LLViewerFetchedTexture::BOOST_ICON; LLRect rect = p.rect; + mDrawWidth = llmax(32, rect.getWidth()) ; + mDrawHeight = llmax(32, rect.getHeight()) ; static LLUICachedControl llavatariconctrl_symbol_hpad("UIAvatariconctrlSymbolHPad", 2); static LLUICachedControl llavatariconctrl_symbol_vpad("UIAvatariconctrlSymbolVPad", 2); @@ -193,7 +195,6 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) LLIconCtrl::setValue("default_profile_picture.j2c"); } - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("AvatarIcon.Action", boost::bind(&LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked, this, _2)); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e5c53c91c9..2368a2da33 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -93,6 +93,7 @@ BOOL LLViewerTexture::sUseTextureAtlas = FALSE ; const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve image quality by const F32 desired_discard_bias_max = 1.5f; // max number of levels to reduce image quality by +const F64 log_2 = log(2.0); //---------------------------------------------------------------------------------------------- //namespace: LLViewerTextureAccess @@ -134,7 +135,7 @@ LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, return tex ; } -LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLViewerTexture* tex, BOOL report_error) +LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTexture* tex, BOOL report_error) { if(!tex) { @@ -522,6 +523,12 @@ F32 LLViewerTexture::getMaxVirtualSize() return mMaxVirtualSize ; } +//virtual +void LLViewerTexture::setKnownDrawSize(S32 width, S32 height) +{ + //nothing here. +} + //virtual void LLViewerTexture::addFace(LLFace* facep) { @@ -852,6 +859,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mKnownDrawWidth = 0; mKnownDrawHeight = 0; + mKnownDrawSizeChanged = FALSE ; if (firstinit) { @@ -1084,10 +1092,17 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) } // Call with 0,0 to turn this feature off. +//virtual void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height) { - mKnownDrawWidth = width; - mKnownDrawHeight = height; + if(mKnownDrawWidth != width || mKnownDrawHeight != height) + { + mKnownDrawWidth = width; + mKnownDrawHeight = height; + + mKnownDrawSizeChanged = TRUE ; + mFullyLoaded = FALSE ; + } addTextureStats((F32)(width * height)); } @@ -1104,13 +1119,26 @@ void LLViewerFetchedTexture::processTextureStats() mDesiredDiscardLevel = getMaxDiscardLevel() ; } else - { - mDesiredDiscardLevel = 0; - if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) + { + if(!mKnownDrawWidth || !mKnownDrawHeight || mFullWidth <= mKnownDrawWidth || mFullHeight <= mKnownDrawHeight) { - mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048 + if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) + { + mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048 + } + else + { + mDesiredDiscardLevel = 0; + } } - + else if(mKnownDrawSizeChanged)//known draw size is set + { + mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2, + log((F32)mFullHeight / mKnownDrawHeight) / log_2) ; + mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ; + } + mKnownDrawSizeChanged = FALSE ; + if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel)) { mFullyLoaded = TRUE ; @@ -1121,8 +1149,6 @@ void LLViewerFetchedTexture::processTextureStats() //texture does not have any data, so we don't know the size of the image, treat it like 32 * 32. F32 LLViewerFetchedTexture::calcDecodePriorityForUnknownTexture(F32 pixel_priority) { - static const F64 log_2 = log(2.0); - F32 desired = (F32)(log(32.0/pixel_priority) / log_2); S32 ddiscard = MAX_DISCARD_LEVEL - (S32)desired + 1; ddiscard = llclamp(ddiscard, 1, 9); @@ -1169,7 +1195,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // Don't decode anything we don't need priority = -1.0f; } - else if (mBoostLevel == LLViewerTexture::BOOST_UI && !have_all_data) + else if ((mBoostLevel == LLViewerTexture::BOOST_UI || mBoostLevel == LLViewerTexture::BOOST_ICON) && !have_all_data) { priority = 1.f; } diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 480e1c1cbc..ef298319d2 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -163,6 +163,7 @@ public: S32 getFullWidth() const { return mFullWidth; } S32 getFullHeight() const { return mFullHeight; } + /*virtual*/ void setKnownDrawSize(S32 width, S32 height); virtual void addFace(LLFace* facep) ; virtual void removeFace(LLFace* facep) ; @@ -357,7 +358,7 @@ public: // Override the computation of discard levels if we know the exact output // size of the image. Used for UI textures to not decode, even if we have // more data. - void setKnownDrawSize(S32 width, S32 height); + /*virtual*/ void setKnownDrawSize(S32 width, S32 height); void setIsMissingAsset(); /*virtual*/ BOOL isMissingAsset() const { return mIsMissingAsset; } @@ -406,6 +407,8 @@ private: BOOL mFullyLoaded; protected: + std::string mLocalFileName; + S32 mOrigWidth; S32 mOrigHeight; @@ -413,8 +416,7 @@ protected: // Used for UI textures to not decode, even if we have more data. S32 mKnownDrawWidth; S32 mKnownDrawHeight; - - std::string mLocalFileName; + BOOL mKnownDrawSizeChanged ; S8 mDesiredDiscardLevel; // The discard level we'd LIKE to have - if we have it and there's space S8 mMinDesiredDiscardLevel; // The minimum discard level we'd like to have @@ -570,7 +572,7 @@ public: static LLTexturePipelineTester* sTesterp ; //returns NULL if tex is not a LLViewerFetchedTexture nor derived from LLViewerFetchedTexture. - static LLViewerFetchedTexture* staticCastToFetchedTexture(LLViewerTexture* tex, BOOL report_error = FALSE) ; + static LLViewerFetchedTexture* staticCastToFetchedTexture(LLTexture* tex, BOOL report_error = FALSE) ; // //"find-texture" just check if the texture exists, if yes, return it, otherwise return null. -- cgit v1.2.3 From b44496495218ab6d005a065625dd5232af4869ce Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 30 Oct 2009 11:37:16 -0700 Subject: EXT-1962 Back button drop down menu now aligns to button. LLNavigationBar was passing coordinates to LLMenuGL::showPopup() in the wrong coordinate frame. Added comments to LLMenuGL to clarify which coordinate frame to use. Not reviewed. --- indra/newview/llnavigationbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 9a05812847..e63daac4af 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -517,8 +517,8 @@ void LLNavigationBar::showTeleportHistoryMenu() // *TODO: why to draw/update anything before showing the menu? mTeleportHistoryMenu->buildDrawLabels(); mTeleportHistoryMenu->updateParent(LLMenuGL::sMenuContainer); - LLRect btnBackRect = mBtnBack->getRect(); - LLMenuGL::showPopup(this, mTeleportHistoryMenu, btnBackRect.mLeft, btnBackRect.mBottom); + const S32 MENU_SPAWN_PAD = -1; + LLMenuGL::showPopup(mBtnBack, mTeleportHistoryMenu, 0, MENU_SPAWN_PAD); // *HACK pass the mouse capturing to the drop-down menu gFocusMgr.setMouseCapture( NULL ); -- cgit v1.2.3 From 0d9682113d28b9814374a784a9724aa1ba4bb942 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 30 Oct 2009 11:43:45 -0700 Subject: EXT-1980 - Bottom bar buttons retain highlight EXT-1936 - [BSI] Reversion - clicking on avatar name in group chat should bring up profile also fixed buttons not working on avatar list in IM window reviewed by Leyla --- indra/newview/llviewerwindow.cpp | 22 +++++++++++++++++++--- .../skins/default/xui/en/panel_bottomtray.xml | 1 + .../newview/skins/default/xui/en/widgets/panel.xml | 3 ++- 3 files changed, 22 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ba32e07464..b574a9c110 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2424,19 +2424,35 @@ void LLViewerWindow::updateUI() BOOL handled_by_top_ctrl = FALSE; LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); + LLView* captor_view = dynamic_cast(mouse_captor); + + //FIXME: only include captor and captor's ancestors if mouse is truly over them --RN //build set of views containing mouse cursor by traversing UI hierarchy and testing //screen rect against mouse cursor view_handle_set_t mouse_hover_set; - // start at current mouse captor (if is a view) or UI root - LLView* root_view = NULL; - root_view = dynamic_cast(mouse_captor); + // constraint mouse enter events to children of mouse captor + LLView* root_view = captor_view; + + // if mouse captor doesn't exist or isn't a LLView + // then allow mouse enter events on entire UI hierarchy if (!root_view) { root_view = mRootView; } + // include all ancestors of captor_view as automatically having mouse + if (captor_view) + { + LLView* captor_parent_view = captor_view->getParent(); + while(captor_parent_view) + { + mouse_hover_set.insert(captor_parent_view->getHandle()); + captor_parent_view = captor_parent_view->getParent(); + } + } + // aggregate visible views that contain mouse cursor in display order // while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 9065c6b3e8..73a1bae1c6 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -10,6 +10,7 @@ left="0" name="bottom_tray" top="28" + chrome="true" border_visible="false" width="1000"> \ No newline at end of file + background_opaque="false" + chrome="false"/> \ No newline at end of file -- cgit v1.2.3 From e5f6f063c199a30297776801704caa8e41b609a3 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 30 Oct 2009 12:05:11 -0700 Subject: DEV-41705 - introduce new floater for nearby media based on Brian's design --- indra/newview/CMakeLists.txt | 2 ++ indra/newview/llviewerfloaterreg.cpp | 3 +++ indra/newview/skins/default/xui/en/menu_viewer.xml | 12 ++++++++++++ 3 files changed, 17 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a7681e4a1d..0133d2222d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -185,6 +185,7 @@ set(viewer_SOURCE_FILES llfloatermediasettings.cpp llfloatermemleak.cpp llfloaternamedesc.cpp + llfloaternearbymedia.cpp llfloaternotificationsconsole.cpp llfloateropenobject.cpp llfloaterparcel.cpp @@ -665,6 +666,7 @@ set(viewer_HEADER_FILES llfloatermediasettings.h llfloatermemleak.h llfloaternamedesc.h + llfloaternearbymedia.h llfloaternotificationsconsole.h llfloateropenobject.h llfloaterparcel.h diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index dace3f875f..9ca2d3f61d 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -80,6 +80,7 @@ #include "llfloatermap.h" #include "llfloatermemleak.h" #include "llfloaternamedesc.h" +#include "llfloaternearbymedia.h" #include "llfloaternotificationsconsole.h" #include "llfloateropenobject.h" #include "llfloaterpay.h" @@ -187,6 +188,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("mute_object_by_name", "floater_mute_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("syswell_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + + LLFloaterReg::add("nearby_media", "floater_nearby_media.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index a59a8b065f..3f63f493b1 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -167,6 +167,18 @@ function="Floater.Toggle" parameter="active_speakers" /> + + + + -- cgit v1.2.3 From 9abcf6684e86b0b8c2d343ccd4864b2e854be3d7 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 30 Oct 2009 16:08:49 -0700 Subject: Add implementation for adding and removing items to and from the nearby media list scroll control --- indra/newview/llviewermedia.cpp | 2 +- indra/newview/llviewermedia.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 249b55d2ab..b623185e0b 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1597,7 +1597,7 @@ LLViewerMediaTexture* LLViewerMediaImpl::updatePlaceholderImage() ////////////////////////////////////////////////////////////////////////////////////////// -LLUUID LLViewerMediaImpl::getMediaTextureID() +LLUUID LLViewerMediaImpl::getMediaTextureID() const { return mTextureId; } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index ee7f84b4cd..b04432730a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -172,7 +172,7 @@ public: bool handleUnicodeCharHere(llwchar uni_char); bool canNavigateForward(); bool canNavigateBack(); - std::string getMediaURL() { return mMediaURL; } + std::string getMediaURL() const { return mMediaURL; } std::string getCurrentMediaURL(); std::string getHomeURL() { return mHomeURL; } void setHomeURL(const std::string& home_url) { mHomeURL = home_url; }; @@ -181,7 +181,7 @@ public: void update(); void updateImagesMediaStreams(); - LLUUID getMediaTextureID(); + LLUUID getMediaTextureID() const; void suspendUpdates(bool suspend) { mSuspendUpdates = suspend; }; void setVisible(bool visible); -- cgit v1.2.3 From 123db56856ef0451e28fe7ac7ce3bcc27d3066f1 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 17:32:23 -0700 Subject: Initial pass at filling in the list in the nearby media floater. --- indra/newview/llviewermedia.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index b623185e0b..44bffd2a08 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -604,7 +604,7 @@ void LLViewerMedia::updateMedia() pimpl->setPriority(new_priority); - if(!pimpl->getUsedInUI()) + if(pimpl->getUsedInUI()) { // Any impls used in the UI should not be in the proximity list. pimpl->mProximity = -1; -- cgit v1.2.3 From b82bda605d85fe9b1ad69ce36a36de18a2924924 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 30 Oct 2009 17:46:01 -0700 Subject: EXT-2018 PRofile "Real World" descripton scrolls before showing "More" link EXT-2011 titles of IM sessions aren't aligned to center EXT-3025 Pick's description overlaps picks name also moved tool tip param default to tool_tip.xml also made default param be SansSerif reviewed by Leyla --- indra/newview/llexpandabletextbox.cpp | 7 ++++++- indra/newview/llexpandabletextbox.h | 10 ---------- indra/newview/llpanelpicks.cpp | 8 ++++---- indra/newview/skins/default/textures/textures.xml | 3 +++ indra/newview/skins/default/xui/en/panel_pick_list_item.xml | 2 +- indra/newview/skins/default/xui/en/widgets/expandable_text.xml | 2 +- 6 files changed, 15 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 48b5fc11b7..7bc48185e6 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -51,7 +51,7 @@ public: /*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { // more label always spans width of text box - width = mEditor.getTextRect().getWidth(); + width = mEditor.getTextRect().getWidth() - mEditor.getHPad(); height = llceil(mStyle->getFont()->getLineHeight()); } /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const @@ -153,6 +153,11 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText() { if (!mExpanderVisible) { + // make sure we're scrolled to top when collapsing + if (mScroller) + { + mScroller->goToTop(); + } // get fully visible lines std::pair visible_lines = getVisibleLines(true); S32 last_line = visible_lines.second - 1; diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index d45527aabb..3fe646c29c 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -68,16 +68,6 @@ protected: */ virtual S32 getVerticalTextDelta(); - /** - * Returns text vertical padding - */ - virtual S32 getVPad() { return mVPad; } - - /** - * Returns text horizontal padding - */ - virtual S32 getHPad() { return mHPad; } - /** * Shows "More" link */ diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index aa6909560d..6181531f82 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -73,10 +73,10 @@ LLPanelPicks::LLPanelPicks() mPopupMenu(NULL), mProfilePanel(NULL), mPickPanel(NULL), - mPicksList(NULL) - , mPanelPickInfo(NULL) - , mPanelPickEdit(NULL) - , mOverflowMenu(NULL) + mPicksList(NULL), + mPanelPickInfo(NULL), + mPanelPickEdit(NULL), + mOverflowMenu(NULL) { } diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index f0d27ac11d..9aa73c28d1 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -726,4 +726,7 @@ + + + diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index 1074dd4627..38ea6b6196 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -57,7 +57,7 @@ use_ellipses="false" width="197" word_wrap="false" /> - Date: Fri, 30 Oct 2009 17:46:48 -0700 Subject: On a double-click in the nearby media list, try to focus/zoom in on the prim holding the media. --- indra/newview/llviewermedia.cpp | 13 +++++++++++++ indra/newview/llviewermedia.h | 1 + indra/newview/llviewermediafocus.cpp | 30 ++++++++++++++++++++++++++++++ indra/newview/llviewermediafocus.h | 3 +++ 4 files changed, 47 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 44bffd2a08..e89f17cf72 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2073,6 +2073,19 @@ const std::list< LLVOVolume* >* LLViewerMediaImpl::getObjectList() const return &mObjectList ; } +LLVOVolume *LLViewerMediaImpl::getSomeObject() +{ + LLVOVolume *result = NULL; + + std::list< LLVOVolume* >::iterator iter = mObjectList.begin() ; + if(iter != mObjectList.end()) + { + result = *iter; + } + + return result; +} + ////////////////////////////////////////////////////////////////////////////////////////// //static void LLViewerMedia::toggleMusicPlay(void*) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b04432730a..dac0482078 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -250,6 +250,7 @@ public: void addObject(LLVOVolume* obj) ; void removeObject(LLVOVolume* obj) ; const std::list< LLVOVolume* >* getObjectList() const ; + LLVOVolume *getSomeObject(); void setUpdated(BOOL updated) ; BOOL isUpdated() ; diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 0ef4679057..ffdac35e71 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -50,6 +50,7 @@ #include "llmediaentry.h" #include "llkeyboard.h" #include "lltoolmgr.h" +#include "llvovolume.h" // // LLViewerMediaFocus @@ -473,3 +474,32 @@ LLViewerObject* LLViewerMediaFocus::getHoverObject() { return gObjectList.findObject(mHoverObjectID); } + +void LLViewerMediaFocus::focusZoomOnMedia(LLUUID media_id) +{ + LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(media_id); + + if(impl) + { + // Get the first object from the media impl's object list. This is completely arbitrary, but should suffice. + LLVOVolume *obj = impl->getSomeObject(); + if(obj) + { + // This media is attached to at least one object. Figure out which face it's on. + S32 face = obj->getFaceIndexWithMediaImpl(impl, -1); + + // We don't have a proper pick normal here, and finding a face's real normal is... complicated. + // For now, use +z to look at the top of the object. + LLVector3 normal(0.0f, 0.0f, 1.0f); + + // Attempt to focus/zoom on that face. + setFocusFace(obj, face, impl, normal); + + if(mMediaControls.get()) + { + mMediaControls.get()->resetZoomLevel(); + mMediaControls.get()->nextZoomLevel(); + } + } + } +} diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index c1179de39d..07a6f0c47b 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -81,6 +81,9 @@ public: LLViewerMediaImpl* getHoverMediaImpl(); LLViewerObject* getHoverObject(); S32 getHoverFace() { return mHoverObjectFace; } + + // Try to focus/zoom on the specified media (if it's on an object in world). + void focusZoomOnMedia(LLUUID media_id); protected: /*virtual*/ void onFocusReceived(); -- cgit v1.2.3 From 2fadd99877eceb55077957b5bab6353611184c86 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 18:14:20 -0700 Subject: Another experiment: made the selection in the nearby media floater track the media impl the media controls are currently referencing (either focus or hover). --- indra/newview/llviewermediafocus.cpp | 14 ++++++++++++++ indra/newview/llviewermediafocus.h | 3 +++ 2 files changed, 17 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index ffdac35e71..2f7040aaa3 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -503,3 +503,17 @@ void LLViewerMediaFocus::focusZoomOnMedia(LLUUID media_id) } } } + +LLUUID LLViewerMediaFocus::getControlsMediaID() +{ + if(getFocusedMediaImpl()) + { + return mFocusedImplID; + } + else if(getHoverMediaImpl()) + { + return mHoverImplID; + } + + return LLUUID::null; +} diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index 07a6f0c47b..e5f36d341c 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -84,6 +84,9 @@ public: // Try to focus/zoom on the specified media (if it's on an object in world). void focusZoomOnMedia(LLUUID media_id); + + // Return the ID of the media instance the controls are currently attached to (either focus or hover). + LLUUID getControlsMediaID(); protected: /*virtual*/ void onFocusReceived(); -- cgit v1.2.3 From bc0d740dfecb2a724566b00b82fbe817270f84d0 Mon Sep 17 00:00:00 2001 From: Erica Date: Fri, 30 Oct 2009 19:05:28 -0700 Subject: EXT-2053 Add parcel permission icons to place profile, layout to spec --- indra/newview/skins/default/textures/textures.xml | 39 +++++++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 05f7c5205d..b497ca5e7a 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -260,6 +260,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -734,7 +770,4 @@ - - - -- cgit v1.2.3 From 60771cce54d3b637b0d6176ea8b2d1a6ea68d306 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 30 Oct 2009 19:07:41 -0700 Subject: forgot to add toolt_tip.xml --- indra/newview/skins/default/xui/en/widgets/tool_tip.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 indra/newview/skins/default/xui/en/widgets/tool_tip.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/widgets/tool_tip.xml b/indra/newview/skins/default/xui/en/widgets/tool_tip.xml new file mode 100644 index 0000000000..6b49f832fd --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/tool_tip.xml @@ -0,0 +1,10 @@ + + + -- cgit v1.2.3 From 801301c435414df1e22c321a685044b7cd43055e Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 30 Oct 2009 21:22:47 -0600 Subject: fix DEV-41913: parcel media does not display on particle textures. --- indra/newview/llface.cpp | 10 +++++++ indra/newview/llface.h | 2 +- indra/newview/llflexibleobject.cpp | 2 +- indra/newview/llviewertexture.cpp | 57 ++++++++++++++++++++++++++++---------- indra/newview/llviewertexture.h | 6 ++++ 5 files changed, 60 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 09b3ce1e86..0276cd9a24 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -278,6 +278,16 @@ void LLFace::setTexture(LLViewerTexture* tex) } mTexture = tex ; + + //check if this texture is replaced by a parcel media texture. + if(mTexture.notNull() && mTexture->hasParcelMedia()) + { + LLViewerMediaTexture* mediap = LLViewerTextureManager::findMediaTexture(mTexture->getID()) ; + if(mediap) + { + mediap->addMediaToFace(this) ; + } + } } void LLFace::dirtyTexture() diff --git a/indra/newview/llface.h b/indra/newview/llface.h index d734b327d9..2b134c8c31 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -246,7 +246,7 @@ protected: //atlas LLPointer mAtlasInfop ; - BOOL mUsingAtlas ; + BOOL mUsingAtlas ; protected: static BOOL sSafeRenderSelect; diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 216bca8262..fc8790c172 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -704,7 +704,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) } if (volume->mLODChanged || volume->mFaceMappingChanged || - volume->mVolumeChanged) + volume->mVolumeChanged || drawable->isState(LLDrawable::REBUILD_MATERIAL)) { volume->regenFaces(); volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 2368a2da33..28ef128265 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -416,6 +416,7 @@ void LLViewerTexture::init(bool firstinit) mDontDiscard = FALSE; mMaxVirtualSize = 0.f; mNeedsResetMaxVirtualSize = FALSE ; + mHasParcelMedia = FALSE ; } //virtual @@ -2150,19 +2151,20 @@ void LLViewerMediaTexture::updateClass() for(media_map_t::iterator iter = sMediaMap.begin() ; iter != sMediaMap.end(); ) { LLViewerMediaTexture* mediap = iter->second; - - // - //Note: delay some time to delete the media textures to stop endlessly creating and immediately removing media texture. - // - if(mediap->getNumRefs() == 1 && mediap->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME) //one by sMediaMap - { - media_map_t::iterator cur = iter++ ; - sMediaMap.erase(cur) ; - } - else + + if(mediap->getNumRefs() == 1) //one reference by sMediaMap { - ++iter ; + // + //Note: delay some time to delete the media textures to stop endlessly creating and immediately removing media texture. + // + if(mediap->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME) + { + media_map_t::iterator cur = iter++ ; + sMediaMap.erase(cur) ; + continue ; + } } + ++iter ; } } @@ -2215,11 +2217,22 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL mIsPlaying = FALSE ; setMediaImpl() ; + + LLViewerTexture* tex = gTextureList.findImage(mID) ; + if(tex) //this media is a parcel media for tex. + { + tex->setParcelMedia(TRUE) ; + mParcelTexture = tex ; + } } //virtual LLViewerMediaTexture::~LLViewerMediaTexture() { + if(mParcelTexture.notNull()) + { + mParcelTexture->setParcelMedia(FALSE) ; + } } void LLViewerMediaTexture::reinit(BOOL usemipmaps /* = TRUE */) @@ -2272,10 +2285,19 @@ BOOL LLViewerMediaTexture::findFaces() BOOL ret = TRUE ; //for parcel media - LLViewerTexture* tex = gTextureList.findImage(mID) ; - if(tex) + if(mParcelTexture.isNull()) { - const ll_face_list_t* face_list = tex->getFaceList() ; + LLViewerTexture* tex = gTextureList.findImage(mID) ; + if(tex) + { + tex->setParcelMedia(TRUE) ; + mParcelTexture = tex ; + } + } + + if(mParcelTexture.notNull()) + { + const ll_face_list_t* face_list = mParcelTexture->getFaceList() ; for(ll_face_list_t::const_iterator iter = face_list->begin(); iter != face_list->end(); ++iter) { mMediaFaceList.push_back(*iter) ; @@ -2382,9 +2404,14 @@ void LLViewerMediaTexture::addFace(LLFace* facep) if(facep->getTexture() && facep->getTexture() != this && facep->getTexture()->getID() == mID) { mTextureList.push_back(facep->getTexture()) ; //a parcel media. + if(mParcelTexture.isNull()) + { + mParcelTexture = facep->getTexture() ; + mParcelTexture->setParcelMedia(TRUE) ; + } return ; } - + llerrs << "The face does not have a valid texture before media texture." << llendl ; } diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index ef298319d2..ce8c47b878 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -221,6 +221,9 @@ public: BOOL getDontDiscard() const { return mDontDiscard; } //----------------- + void setParcelMedia(BOOL has_media) {mHasParcelMedia = has_media;} + BOOL hasParcelMedia() const { return mHasParcelMedia ;} + /*virtual*/ void updateBindStatsForTester() ; protected: void cleanup() ; @@ -247,6 +250,8 @@ protected: LLPointer mGLTexturep ; S8 mDontDiscard; // Keep full res version of this image (for UI, etc) + BOOL mHasParcelMedia ; + protected: typedef enum { @@ -547,6 +552,7 @@ private: LLViewerMediaImpl* mMediaImplp ; BOOL mIsPlaying ; U32 mUpdateVirtualSizeTime ; + LLPointer< LLViewerTexture > mParcelTexture ; //the texture replaces this media texure when it is a parcel media texture. public: static void updateClass() ; -- cgit v1.2.3 From caca1eae26b324f22d40cf66ffb6ff8a99e0ceef Mon Sep 17 00:00:00 2001 From: Erica Date: Sat, 31 Oct 2009 12:44:34 -0700 Subject: Convert URLs in notifications and viewer stings to wiki URL format EXT-1952, Reword Abuse Report notification to reduce wordcount EXT-1953 --- .../newview/skins/default/xui/en/notifications.xml | 60 ++++++++++------------ 1 file changed, 27 insertions(+), 33 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 9aacb8a92c..d51cb13093 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -13,7 +13,7 @@ Close - +