summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanelnearbymedia.cpp8
-rw-r--r--indra/newview/llviewerwindow.cpp44
-rw-r--r--indra/newview/skins/default/xui/en/inspector_info_ctrl.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_media.xml16
4 files changed, 45 insertions, 29 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 4f2d6374ca..103ad95431 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),
@@ -168,7 +169,7 @@ 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;
@@ -954,7 +955,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 +965,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/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/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 &gt;&gt;"
label_selected="Less &lt;&lt;">
<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 &gt;&gt;"
+ label_selected="Less &lt;&lt;">
+ <button.commit_callback
+ function="MediaListCtrl.MoreLess" />
+ </button>
</panel>
<panel
name="nearby_media_panel"