diff options
author | Eli Linden <eli@lindenlab.com> | 2010-04-08 17:06:42 -0700 |
---|---|---|
committer | Eli Linden <eli@lindenlab.com> | 2010-04-08 17:06:42 -0700 |
commit | 4ed913c3760308ea67db8beb9e6330933104a8ab (patch) | |
tree | d459b28762773451148ddc8ce661fc30334839dd /indra/newview | |
parent | 2a42ba08a351fd29af1e1ffc85840e2323ed8163 (diff) | |
parent | 571ee16a1ff240873b602c6d01a1e3dbd17f2bc2 (diff) |
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelnearbymedia.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llpanelnearbymedia.h | 4 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 44 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/inspector_info_ctrl.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_login.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_nearby_media.xml | 16 |
8 files changed, 78 insertions, 50 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 4f2d6374ca..93ebae334f 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -74,6 +74,7 @@ static const LLUUID PARCEL_AUDIO_LIST_ITEM_UUID = LLUUID("DF4B020D-8A24-4B95-AB5 // LLPanelNearByMedia // + LLPanelNearByMedia::LLPanelNearByMedia() : mMediaList(NULL), mEnableAllCtrl(NULL), @@ -87,6 +88,8 @@ LLPanelNearByMedia::LLPanelNearByMedia() mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && gSavedSettings.getBOOL("MediaTentativeAutoPlay"); + gSavedSettings.getControl(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING)->getSignal()->connect(boost::bind(&LLPanelNearByMedia::handleMediaAutoPlayChanged, this, _2)); + mCommitCallbackRegistrar.add("MediaListCtrl.EnableAll", boost::bind(&LLPanelNearByMedia::onClickEnableAll, this)); mCommitCallbackRegistrar.add("MediaListCtrl.DisableAll", boost::bind(&LLPanelNearByMedia::onClickDisableAll, this)); mCommitCallbackRegistrar.add("MediaListCtrl.GoMediaPrefs", boost::bind(&LLPanelNearByMedia::onAdvancedButtonClick, this)); @@ -168,12 +171,19 @@ BOOL LLPanelNearByMedia::postBuild() mLessRect = getRect(); mLessRect.mBottom = minimized_controls->getRect().mBottom; - getChild<LLUICtrl>("more_less_btn")->setValue(false); + getChild<LLUICtrl>("more_btn")->setVisible(false); onMoreLess(); return TRUE; } +void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue) +{ + // update mParcelAudioAutoStart if AUTO_PLAY_MEDIA_SETTING changes + mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && + gSavedSettings.getBOOL("MediaTentativeAutoPlay"); +} + /*virtual*/ void LLPanelNearByMedia::onMouseEnter(S32 x, S32 y, MASK mask) { @@ -954,7 +964,7 @@ void LLPanelNearByMedia::onAdvancedButtonClick() void LLPanelNearByMedia::onMoreLess() { - bool is_more = getChild<LLUICtrl>("more_less_btn")->getValue(); + bool is_more = getChild<LLUICtrl>("more_btn")->getVisible(); mNearbyMediaPanel->setVisible(is_more); // enable resizing when expanded @@ -964,6 +974,9 @@ void LLPanelNearByMedia::onMoreLess() new_rect.translate(getRect().mRight - new_rect.mRight, getRect().mTop - new_rect.mTop); setShape(new_rect); + + getChild<LLUICtrl>("more_btn")->setVisible(!is_more); + getChild<LLUICtrl>("less_btn")->setVisible(is_more); } void LLPanelNearByMedia::updateControls() diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index af4659365f..7c07867df3 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -63,6 +63,10 @@ public: // interaction with our buttons. bool getParcelAudioAutoStart(); + // callback for when the auto play media preference changes + // to update mParcelAudioAutoStart + void handleMediaAutoPlayChanged(const LLSD& newvalue); + LLPanelNearByMedia(); virtual ~LLPanelNearByMedia(); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 84c463495b..a9bbee784d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -181,10 +181,10 @@ BOOL LLToolPie::pickLeftMouseDownCallback() parent = object->getRootEdit(); } - - BOOL touchable = (object && object->flagHandleTouch()) - || (parent && parent->flagHandleTouch()); - + if (handleMediaClick(mPick)) + { + return TRUE; + } // If it's a left-click, and we have a special action, do it. if (useClickAction(mask, object, parent)) @@ -286,14 +286,12 @@ BOOL LLToolPie::pickLeftMouseDownCallback() } } - if (handleMediaClick(mPick)) - { - return TRUE; - } - // put focus back "in world" gFocusMgr.setKeyboardFocus(NULL); + BOOL touchable = (object && object->flagHandleTouch()) + || (parent && parent->flagHandleTouch()); + // Switch to grab tool if physical or triggerable if (object && !object->isAvatar() && @@ -513,21 +511,22 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) } LLViewerObject* click_action_object = click_action_pick.getObject(); - if (click_action_object && useClickAction(mask, click_action_object, click_action_object->getRootEdit())) + if (handleMediaHover(mHoverPick)) { + // *NOTE: If you think the hover glow conflicts with the media outline, you + // could disable it here. show_highlight = true; - ECursorType cursor = cursor_from_object(click_action_object); - gViewerWindow->setCursor(cursor); + // cursor set by media object lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } - else if (handleMediaHover(mHoverPick)) + else if (click_action_object && useClickAction(mask, click_action_object, click_action_object->getRootEdit())) { - // *NOTE: If you think the hover glow conflicts with the media outline, you - // could disable it here. show_highlight = true; - // cursor set by media object + ECursorType cursor = cursor_from_object(click_action_object); + gViewerWindow->setCursor(cursor); lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } + else if ((object && !object->isAvatar() && object->usePhysics()) || (parent && !parent->isAvatar() && parent->usePhysics())) { diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index af0dcd8e35..a5adb11c53 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1426,15 +1426,15 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) //virtual void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height) { - if(mKnownDrawWidth != width || mKnownDrawHeight != height) + if(mKnownDrawWidth < width || mKnownDrawHeight < height) { - mKnownDrawWidth = width; - mKnownDrawHeight = height; + mKnownDrawWidth = llmax(mKnownDrawWidth, width) ; + mKnownDrawHeight = llmax(mKnownDrawHeight, height) ; mKnownDrawSizeChanged = TRUE ; mFullyLoaded = FALSE ; } - addTextureStats((F32)(width * height)); + addTextureStats((F32)(mKnownDrawWidth * mKnownDrawHeight)); } //virtual diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 81033485ee..a96a6bf1b3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -857,7 +857,11 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (obj && !obj->getRegion()->getCapability("ObjectMedia").empty()) { LLTextureEntry *te = obj->getTE(object_face); - if (te) + + // can modify URL if we can modify the object or we have navigate permissions + bool allow_modify_url = obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ); + + if (te && allow_modify_url ) { if (drop) { @@ -888,29 +892,24 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi // URL passes the whitelist if (te->getMediaData()->checkCandidateUrl( url ) ) { - // we are allowed to modify the object or we have navigate permissions - // NOTE: Design states you you can change the URL if you have media - // navigate permissions even if you do not have prim modify rights - if ( obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ) ) + // just navigate to the URL + if (obj->getMediaImpl(object_face)) { - // just navigate to the URL - if (obj->getMediaImpl(object_face)) - { - obj->getMediaImpl(object_face)->navigateTo(url); - } - else - { - // This is very strange. Navigation should - // happen via the Impl, but we don't have one. - // This sends it to the server, which /should/ - // trigger us getting it. Hopefully. - LLSD media_data; - media_data[LLMediaEntry::CURRENT_URL_KEY] = url; - obj->syncMediaData(object_face, media_data, true, true); - obj->sendMediaDataUpdate(); - } - result = LLWindowCallbacks::DND_LINK; + obj->getMediaImpl(object_face)->navigateTo(url); } + else + { + // This is very strange. Navigation should + // happen via the Impl, but we don't have one. + // This sends it to the server, which /should/ + // trigger us getting it. Hopefully. + LLSD media_data; + media_data[LLMediaEntry::CURRENT_URL_KEY] = url; + obj->syncMediaData(object_face, media_data, true, true); + obj->sendMediaDataUpdate(); + } + result = LLWindowCallbacks::DND_LINK; + } } LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject); @@ -930,6 +929,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLSelectMgr::getInstance()->highlightObjectOnly(mDragHoveredObject); } result = (! te->hasMedia()) ? LLWindowCallbacks::DND_COPY : LLWindowCallbacks::DND_LINK; + } } } diff --git a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml index 39fb54d513..a7ecc39ed8 100644 --- a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml +++ b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml @@ -1,8 +1,8 @@ <button chrome="true" - image_selected="Info_Small" - image_unselected="Info_Small" - image_pressed="Info_Small" + image_selected="Info_Over" + image_unselected="Info_Over" + image_pressed="Info_Over" height="12" name="inspector_info_ctrl" width="12" /> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 4655fa8c46..e95300a4b3 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu_bar - follows="left|top|right" + follows="left|top" height="18" layout="topleft" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index 53dda1927a..ff2aae645b 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -64,19 +64,31 @@ function="MediaListCtrl.GoMediaPrefs" /> </button> <button - name="more_less_btn" + name="more_btn" follows="right" tool_tip="Advanced Controls" top_delta="0" right="-8" width="66" height="22" - toggle="true" label="More >>" label_selected="Less <<"> <button.commit_callback function="MediaListCtrl.MoreLess" /> </button> + <button + name="less_btn" + follows="right" + tool_tip="Advanced Controls" + top_delta="0" + right="-8" + width="66" + height="22" + label="More >>" + label_selected="Less <<"> + <button.commit_callback + function="MediaListCtrl.MoreLess" /> + </button> </panel> <panel name="nearby_media_panel" |