summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llmediadataclient.cpp2
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp6
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.h2
-rw-r--r--indra/newview/llpanelmediasettingspermissions.cpp46
-rw-r--r--indra/newview/llpanelmediasettingspermissions.h1
-rw-r--r--indra/newview/lltoolpie.cpp8
-rw-r--r--indra/newview/llviewermedia.cpp14
-rw-r--r--indra/newview/llviewermedia.h2
-rw-r--r--indra/newview/llviewermediafocus.cpp16
-rw-r--r--indra/newview/llvovolume.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml30
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml43
12 files changed, 104 insertions, 73 deletions
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 2694075a58..91064eea6b 100755
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -402,7 +402,7 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::request_queue
LLMediaDataClient::request_queue_t::const_iterator end = q.end();
while (iter != end)
{
- s << "\t" << i << "]: " << (*iter)->getObject()->getID().asString();
+ s << "\t" << i << "]: " << (*iter)->getObject()->getID().asString() << "(" << (*iter)->getObject()->getMediaInterest() << ")";
iter++;
i++;
}
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index 88eba14553..f574f55beb 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -67,7 +67,6 @@ const char *CHECKERBOARD_DATA_URL = "data:image/svg+xml,%3Csvg xmlns=%22http://w
////////////////////////////////////////////////////////////////////////////////
//
LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() :
- mControls( NULL ),
mAutoLoop( NULL ),
mFirstClick( NULL ),
mAutoZoom( NULL ),
@@ -93,7 +92,6 @@ BOOL LLPanelMediaSettingsGeneral::postBuild()
mAutoPlay = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_PLAY_KEY );
mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY );
mAutoZoom = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_ZOOM_KEY );
- mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY );
mCurrentURL = getChild< LLTextBox >( LLMediaEntry::CURRENT_URL_KEY );
mFirstClick = getChild< LLCheckBoxCtrl >( LLMediaEntry::FIRST_CLICK_INTERACT_KEY );
mHeightPixels = getChild< LLSpinCtrl >( LLMediaEntry::HEIGHT_PIXELS_KEY );
@@ -211,7 +209,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mAutoPlay->clear();
self->mAutoScale->clear();
self->mAutoZoom ->clear();
- self->mControls->clear();
self->mCurrentURL->clear();
self->mFirstClick->clear();
self->mHeightPixels->clear();
@@ -221,7 +218,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mAutoPlay ->setEnabled(editable);
self->mAutoScale ->setEnabled(editable);
self->mAutoZoom ->setEnabled(editable);
- self->mControls ->setEnabled(editable);
self->mCurrentURL ->setEnabled(editable);
self->mFirstClick ->setEnabled(editable);
self->mHeightPixels ->setEnabled(editable);
@@ -283,7 +279,6 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_
{ LLMediaEntry::AUTO_PLAY_KEY, self->mAutoPlay, "LLCheckBoxCtrl" },
{ 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, "LLTextBox" },
{ LLMediaEntry::HEIGHT_PIXELS_KEY, self->mHeightPixels, "LLSpinCtrl" },
{ LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" },
@@ -416,7 +411,6 @@ void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in )
fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = (LLSD::Boolean)mAutoPlay->getValue();
fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = (LLSD::Boolean)mAutoScale->getValue();
fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = (LLSD::Boolean)mAutoZoom->getValue();
- fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex();
//Don't fill in current URL: this is only supposed to get changed via navigate
// fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue();
fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = (LLSD::Integer)mHeightPixels->getValue();
diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h
index c6895b1dc9..5f90321362 100644
--- a/indra/newview/llpanelmediasettingsgeneral.h
+++ b/indra/newview/llpanelmediasettingsgeneral.h
@@ -37,7 +37,6 @@
class LLButton;
class LLCheckBoxCtrl;
-class LLComboBox;
class LLLineEditor;
class LLSpinCtrl;
class LLTextureCtrl;
@@ -90,7 +89,6 @@ private:
void checkHomeUrlPassesWhitelist();
- LLComboBox* mControls;
LLCheckBoxCtrl* mAutoLoop;
LLCheckBoxCtrl* mFirstClick;
LLCheckBoxCtrl* mAutoZoom;
diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp
index 2f3f550e35..a23aed2e98 100644
--- a/indra/newview/llpanelmediasettingspermissions.cpp
+++ b/indra/newview/llpanelmediasettingspermissions.cpp
@@ -51,9 +51,11 @@
#include "llnamebox.h"
#include "lltrans.h"
#include "llfloatermediasettings.h"
+
////////////////////////////////////////////////////////////////////////////////
//
LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() :
+ mControls( NULL ),
mPermsOwnerInteract( 0 ),
mPermsOwnerControl( 0 ),
mPermsGroupName( 0 ),
@@ -71,6 +73,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() :
BOOL LLPanelMediaSettingsPermissions::postBuild()
{
// connect member vars with UI widgets
+ mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY );
mPermsOwnerInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_INTERACT_KEY );
mPermsOwnerControl = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_CONTROL_KEY );
mPermsGroupInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_GROUP_INTERACT_KEY );
@@ -123,19 +126,22 @@ void LLPanelMediaSettingsPermissions::draw()
void LLPanelMediaSettingsPermissions::clearValues( void* userdata, bool editable)
{
LLPanelMediaSettingsPermissions *self =(LLPanelMediaSettingsPermissions *)userdata;
+
+ self->mControls->clear();
self->mPermsOwnerInteract->clear();
self->mPermsOwnerControl->clear();
- self->mPermsGroupInteract ->clear();
+ self->mPermsGroupInteract->clear();
self->mPermsGroupControl->clear();
- self->mPermsWorldInteract ->clear();
- self->mPermsWorldControl ->clear();
+ self->mPermsWorldInteract->clear();
+ self->mPermsWorldControl->clear();
+ self->mControls->setEnabled(editable);
self->mPermsOwnerInteract->setEnabled(editable);
- self->mPermsOwnerControl ->setEnabled(editable);
+ self->mPermsOwnerControl->setEnabled(editable);
self->mPermsGroupInteract->setEnabled(editable);
- self->mPermsGroupControl ->setEnabled(editable);
+ self->mPermsGroupControl->setEnabled(editable);
self->mPermsWorldInteract->setEnabled(editable);
- self->mPermsWorldControl ->setEnabled(editable);
+ self->mPermsWorldControl->setEnabled(editable);
}
////////////////////////////////////////////////////////////////////////////////
@@ -175,6 +181,7 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me
} data_set [] =
{
+ { LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" },
{ LLPanelContents::PERMS_OWNER_INTERACT_KEY, self->mPermsOwnerInteract, "LLCheckBoxCtrl" },
{ LLPanelContents::PERMS_OWNER_CONTROL_KEY, self->mPermsOwnerControl, "LLCheckBoxCtrl" },
{ LLPanelContents::PERMS_GROUP_INTERACT_KEY, self->mPermsGroupInteract, "LLCheckBoxCtrl" },
@@ -194,27 +201,27 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me
{
if ( data_set[ i ].ctrl_type == "LLCheckBoxCtrl" )
{
- // the sense of the checkboxes changed and it made sense
- // to just reverse their sense back again here and avoid
- // changing server code.
+ // Most recent change to the "sense" of these checkboxes
+ // means the value in the checkbox matches that on the server
static_cast< LLCheckBoxCtrl* >( data_set[ i ].ctrl_ptr )->
- setValue( ! media_settings[ base_key ].asBoolean() );
+ setValue( media_settings[ base_key ].asBoolean() );
}
else
if ( data_set[ i ].ctrl_type == "LLComboBox" )
static_cast< LLComboBox* >( data_set[ i ].ctrl_ptr )->
setCurrentByIndex( media_settings[ base_key ].asInteger() );
+
data_set[ i ].ctrl_ptr->setEnabled(editable);
data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() );
};
};
+
self->childSetEnabled("media_perms_label_owner", editable );
self->childSetText("media_perms_label_owner", LLTrans::getString("Media Perms Owner") );
self->childSetEnabled("media_perms_label_group", editable );
self->childSetText("media_perms_label_group", LLTrans::getString("Media Perms Group") );
self->childSetEnabled("media_perms_label_anyone", editable );
self->childSetText("media_perms_label_anyone", LLTrans::getString("Media Perms Anyone") );
-
}
////////////////////////////////////////////////////////////////////////////////
@@ -228,6 +235,9 @@ void LLPanelMediaSettingsPermissions::preApply()
//
void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in )
{
+ // moved over from the 'General settings' tab
+ fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex();
+
// *NOTE: For some reason, gcc does not like these symbol references in the
// expressions below (inside the static_casts). I have NO idea why :(.
// For some reason, assigning them to const temp vars here fixes the link
@@ -237,13 +247,13 @@ void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in )
const U8 group = LLMediaEntry::PERM_GROUP;
const U8 anyone = LLMediaEntry::PERM_ANYONE;
const LLSD::Integer control = static_cast<LLSD::Integer>(
- (mPermsOwnerControl->getValue() ? none : owner ) |
- (mPermsGroupControl->getValue() ? none : group ) |
- (mPermsWorldControl->getValue() ? none : anyone ));
+ (mPermsOwnerControl->getValue() ? owner : none ) |
+ (mPermsGroupControl->getValue() ? group: none ) |
+ (mPermsWorldControl->getValue() ? anyone : none ));
const LLSD::Integer interact = static_cast<LLSD::Integer>(
- (mPermsOwnerInteract->getValue() ? none : owner ) |
- (mPermsGroupInteract->getValue() ? none : group ) |
- (mPermsWorldInteract->getValue() ? none : anyone ));
+ (mPermsOwnerInteract->getValue() ? owner: none ) |
+ (mPermsGroupInteract->getValue() ? group : none ) |
+ (mPermsWorldInteract->getValue() ? anyone : none ));
fill_me_in[LLMediaEntry::PERMS_CONTROL_KEY] = control;
fill_me_in[LLMediaEntry::PERMS_INTERACT_KEY] = interact;
}
@@ -255,3 +265,5 @@ void LLPanelMediaSettingsPermissions::postApply()
{
// no-op
}
+
+
diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h
index 45a596c615..bd0c3b8ab5 100644
--- a/indra/newview/llpanelmediasettingspermissions.h
+++ b/indra/newview/llpanelmediasettingspermissions.h
@@ -65,6 +65,7 @@ public:
static void clearValues( void* userdata, bool editable);
private:
+ LLComboBox* mControls;
LLCheckBoxCtrl* mPermsOwnerInteract;
LLCheckBoxCtrl* mPermsOwnerControl;
LLNameBox* mPermsGroupName;
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 5ed8dc5fb9..f88de20242 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1243,8 +1243,6 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
return false;
}
-
-
// Does this face have media?
const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace);
if(!tep)
@@ -1257,11 +1255,11 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL;
- if (gSavedSettings.getBOOL("MediaOnAPrimUI")
- && media_impl.notNull())
+ if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
{
- if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) )
+ if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull())
{
+ // It's okay to give this a null impl
LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal);
}
else
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 57e4ed0c1e..7c5b360b92 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -558,6 +558,20 @@ bool LLViewerMedia::getInWorldMediaDisabled()
return sInWorldMediaDisabled;
}
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
+bool LLViewerMedia::isInterestingEnough(const LLUUID &object_id, const F64 &object_interest)
+{
+ if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object_id)
+ {
+ return true;
+ }
+ else {
+ // XXX HACK
+ return object_interest > 1023;// INTEREST_THRESHHOLD;
+ }
+}
+
LLViewerMedia::impl_list &LLViewerMedia::getPriorityList()
{
return sViewerMediaImplList;
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 349a66867a..26b822aba6 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -112,6 +112,8 @@ class LLViewerMedia
static void setInWorldMediaDisabled(bool disabled);
static bool getInWorldMediaDisabled();
+ static bool isInterestingEnough(const LLUUID& object_id, const F64 &object_interest);
+
// Returns the priority-sorted list of all media impls.
static impl_list &getPriorityList();
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index f639c841e7..e04a54fbd6 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -144,9 +144,19 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
}
mFocusedImplID = LLUUID::null;
- mFocusedObjectID = LLUUID::null;
- mFocusedObjectFace = 0;
+ if (objectp.notNull())
+ {
+ // Still record the focused object...it may mean we need to load media data.
+ // This will aid us in determining this object is "important enough"
+ mFocusedObjectID = objectp->getID();
+ mFocusedObjectFace = face;
+ }
+ else {
+ mFocusedObjectID = LLUUID::null;
+ mFocusedObjectFace = 0;
+ }
}
+
}
void LLViewerMediaFocus::clearFocus()
@@ -336,7 +346,7 @@ BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks)
void LLViewerMediaFocus::update()
{
- if(mFocusedImplID.notNull() || mFocusedObjectID.notNull())
+ if(mFocusedImplID.notNull())
{
// We have a focused impl/face.
if(!getFocus())
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 08e12f4ad9..801bd90423 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -68,6 +68,7 @@
#include "llmediaentry.h"
#include "llmediadataclient.h"
#include "llagent.h"
+#include "llviewermediafocus.h"
const S32 MIN_QUIET_FRAMES_COALESCE = 30;
const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
@@ -138,8 +139,7 @@ public:
}
virtual bool isInterestingEnough() const
{
- // TODO: use performance manager to control this
- return true;
+ return LLViewerMedia::isInterestingEnough(mObject->getID(), getMediaInterest());
}
virtual std::string getCapabilityUrl(const std::string &name) const
@@ -2089,6 +2089,9 @@ viewer_media_t LLVOVolume::getMediaImpl(U8 face_id) const
F64 LLVOVolume::getTotalMediaInterest() const
{
+ if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == getID())
+ return F64_MAX;
+
F64 interest = (F64)-1.0; // means not interested;
int i = 0;
const int end = getNumTEs();
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index 24c40b32fb..c8ec515e6d 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -93,35 +93,6 @@
<button.commit_callback
function="Media.ResetCurrentUrl"/>
</button>
- <text
- bottom_delta="-5"
- follows="top|left"
- height="15"
- left="10"
- name="controls_label">
- Controls:
- </text>
- <combo_box
- allow_text_entry="false"
- bottom_delta="-20"
- follows="left|top"
- height="18"
- left="10"
- max_chars="20"
- name="controls"
- width="120">
- <combo_item
- name="Standard"
- value="Standard">
- Standard
- </combo_item>
- <combo_item
- name="Mini"
- value="Mini">
- Mini
- </combo_item>
- </combo_box>
-
<check_box
bottom_delta="-25"
enabled="true"
@@ -135,7 +106,6 @@
name="auto_loop"
radio_style="false"
width="150" />
-
<check_box
bottom_delta="-25"
visible="false"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
index 85f534c4a3..b5c2371510 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
@@ -4,13 +4,42 @@
enabled="true"
follows="left|top|right|bottom"
height="500"
- label="Controls"
+ label="Customize"
left="102"
mouse_opaque="true"
name="Media settings for controls"
help_topic = "media_settings_controls"
width="365">
+ <text
+ bottom_delta="-50"
+ follows="top|left"
+ height="15"
+ left="10"
+ name="controls_label">
+ Controls:
+ </text>
+ <combo_box
+ allow_text_entry="false"
+ bottom_delta="0"
+ follows="left|top"
+ height="18"
+ left="100"
+ max_chars="20"
+ name="controls"
+ width="120">
+ <combo_item
+ name="Standard"
+ value="Standard">
+ Standard
+ </combo_item>
+ <combo_item
+ name="Mini"
+ value="Mini">
+ Mini
+ </combo_item>
+ </combo_box>
+
<text
bottom_delta="-50"
follows="top|left"
@@ -27,7 +56,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Disable Navigation &amp; Interactivity"
+ label="Allow Navigation &amp; Interactivity"
left="30"
mouse_opaque="true"
name="perms_owner_interact"
@@ -41,7 +70,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Hide Control Bar"
+ label="Show Control Bar"
left="30"
mouse_opaque="true"
name="perms_owner_control"
@@ -74,7 +103,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Disable Navigation &amp; Interactivity"
+ label="Allow Navigation &amp; Interactivity"
left="30"
mouse_opaque="true"
name="perms_group_interact"
@@ -88,7 +117,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Hide Control Bar"
+ label="Show Control Bar"
left="30"
mouse_opaque="true"
name="perms_group_control"
@@ -111,7 +140,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Disable Navigation &amp; Interactivity"
+ label="Allow Navigation &amp; Interactivity"
left="30"
mouse_opaque="true"
name="perms_anyone_interact"
@@ -125,7 +154,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Hide Control Bar"
+ label="Show Control Bar"
left="30"
mouse_opaque="true"
name="perms_anyone_control"