summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinspectavatar.cpp6
-rw-r--r--indra/newview/llpanelavatar.cpp4
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp11
-rw-r--r--indra/newview/llsidepanelappearance.cpp17
-rw-r--r--indra/newview/llspatialpartition.cpp1
-rw-r--r--indra/newview/llviewermedia.cpp75
-rw-r--r--indra/newview/llviewermedia.h6
-rw-r--r--indra/newview/llviewerparcelmedia.cpp40
-rw-r--r--indra/newview/skins/default/xui/en/floater_whitelist_entry.xml3
9 files changed, 111 insertions, 52 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 72994a4371..a2b3a54f51 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -278,7 +278,7 @@ void LLInspectAvatar::onOpen(const LLSD& data)
getChild<LLUICtrl>("gear_self_btn")->setVisible(self);
getChild<LLUICtrl>("gear_btn")->setVisible(!self);
-
+
// Position the inspector relative to the mouse cursor
// Similar to how tooltips are positioned
// See LLToolTipMgr::createToolTip
@@ -518,13 +518,17 @@ void LLInspectAvatar::updateVolumeSlider()
bool is_muted = LLMuteList::getInstance()->
isMuted(mAvatarID, LLMute::flagVoiceChat);
bool voice_enabled = gVoiceClient->getVoiceEnabled(mAvatarID);
+ bool is_self = (mAvatarID == gAgent.getID());
LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn");
mute_btn->setEnabled( voice_enabled );
mute_btn->setValue( is_muted );
+ mute_btn->setVisible( voice_enabled && !is_self );
LLUICtrl* volume_slider = getChild<LLUICtrl>("volume_slider");
volume_slider->setEnabled( voice_enabled && !is_muted );
+ volume_slider->setVisible( voice_enabled && !is_self );
+
const F32 DEFAULT_VOLUME = 0.5f;
F32 volume;
if (is_muted)
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index f3d6dbbb46..fb898f7cdf 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -594,8 +594,8 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g
if (it != mGroups.begin())
groups += ", ";
-
- std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + it->first + "]";
+ std::string group_name = LLURI::escape(it->first);
+ std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + group_name + "]";
groups += group_url;
}
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index a1c12412b5..550fee71bf 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -181,6 +181,10 @@ void LLPanelOutfitsInventory::onNew()
{
const std::string& outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);
LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name);
+ if (mAppearanceTabs)
+ {
+ mAppearanceTabs->selectTabByName("outfitslist_tab");
+ }
}
void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
@@ -412,8 +416,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
return (getCorrectListenerForAction() != NULL) && hasItemsSelected();
}
- if (command_name == "wear" ||
- command_name == "make_outfit")
+ if (command_name == "wear")
{
const BOOL is_my_outfits = (mActivePanel->getName() == "outfitslist_tab");
if (!is_my_outfits)
@@ -421,6 +424,10 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
return FALSE;
}
}
+ if (command_name == "make_outfit")
+ {
+ return TRUE;
+ }
if (command_name == "edit" ||
command_name == "add"
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 0ae62843ac..77a370cc3f 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -62,6 +62,7 @@ public:
{
mPanel->inventoryFetched();
gInventory.removeObserver(this);
+ delete this;
}
private:
LLSidepanelAppearance *mPanel;
@@ -94,14 +95,12 @@ LLSidepanelAppearance::LLSidepanelAppearance() :
mLookInfo(NULL),
mCurrOutfitPanel(NULL)
{
- //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_appearance.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
- mFetchWorn = new LLCurrentlyWornFetchObserver(this);
-
- mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);
}
LLSidepanelAppearance::~LLSidepanelAppearance()
{
+ gInventory.removeObserver(mOutfitRenameWatcher);
+ delete mOutfitRenameWatcher;
}
// virtual
@@ -156,6 +155,7 @@ BOOL LLSidepanelAppearance::postBuild()
mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook");
+ mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);
gInventory.addObserver(mOutfitRenameWatcher);
return TRUE;
@@ -389,16 +389,17 @@ void LLSidepanelAppearance::fetchInventory()
}
}
- mFetchWorn->fetchItems(ids);
+ LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(this);
+ fetch_worn->fetchItems(ids);
// If no items to be fetched, done will never be triggered.
// TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
- if (mFetchWorn->isEverythingComplete())
+ if (fetch_worn->isEverythingComplete())
{
- mFetchWorn->done();
+ fetch_worn->done();
}
else
{
- gInventory.addObserver(mFetchWorn);
+ gInventory.addObserver(fetch_worn);
}
}
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 6ca6734598..514d8facb4 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2460,7 +2460,6 @@ void renderOctree(LLSpatialGroup* group)
gGL.color4fv(col.mV);
drawBox(group->mObjectBounds[0], group->mObjectBounds[1]*1.01f+LLVector3(0.001f, 0.001f, 0.001f));
- glDepthMask(GL_TRUE);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
if (group->mBuilt <= 0.f)
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 7e8c8eb92e..9671b9e5dc 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -48,12 +48,15 @@
#include "llviewerwindow.h"
#include "llfocusmgr.h"
#include "llcallbacklist.h"
+#include "llparcel.h"
+#include "llaudioengine.h" // for gAudiop
#include "llevent.h" // LLSimpleListener
#include "llnotificationsutil.h"
#include "lluuid.h"
#include "llkeyboard.h"
#include "llmutelist.h"
+#include "llfirstuse.h"
#include <boost/bind.hpp> // for SkinFolder listener
#include <boost/signals2.hpp>
@@ -708,6 +711,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
std::vector<LLViewerMediaImpl*> proximity_order;
+ bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
+ bool needs_first_run = LLViewerMedia::needsMediaFirstRun();
U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal");
U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal");
U32 max_low = gSavedSettings.getU32("PluginInstancesLow");
@@ -822,6 +827,21 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
new_priority = LLPluginClassMedia::PRIORITY_LOW;
}
+ if(!inworld_media_enabled)
+ {
+ // If inworld media is locked out, force all inworld media to stay unloaded.
+ if(!pimpl->getUsedInUI())
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
+ if(needs_first_run)
+ {
+ // Don't do this more than once in this loop.
+ needs_first_run = false;
+ LLViewerMedia::displayMediaFirstRun();
+ }
+ }
+ }
+
pimpl->setPriority(new_priority);
if(pimpl->getUsedInUI())
@@ -888,6 +908,61 @@ void LLViewerMedia::cleanupClass()
gIdleCallbacks.deleteFunction(LLViewerMedia::updateMedia, NULL);
}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
+bool LLViewerMedia::needsMediaFirstRun()
+{
+ return gWarningSettings.getBOOL("FirstStreamingMedia");
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
+void LLViewerMedia::displayMediaFirstRun()
+{
+ gWarningSettings.setBOOL("FirstStreamingMedia", FALSE);
+
+ LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
+ boost::bind(firstRunCallback, _1, _2));
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
+bool LLViewerMedia::firstRunCallback(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0)
+ {
+ // user has elected to automatically play media.
+ gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE);
+ gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
+ gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
+ gSavedSettings.setBOOL("AudioStreamingMedia", TRUE);
+
+ LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+
+ if (parcel)
+ {
+ // play media right now, if available
+ LLViewerParcelMedia::play(parcel);
+
+ // play music right now, if available
+ std::string music_url = parcel->getMusicURL();
+ if (gAudiop && !music_url.empty())
+ gAudiop->startInternetStream(music_url);
+ }
+ }
+ else
+ {
+ gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, FALSE);
+ gSavedSettings.setBOOL("AudioStreamingMedia", FALSE);
+ gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
+ gSavedSettings.setBOOL("AudioStreamingMusic", FALSE);
+ }
+ return false;
+}
+
+
//////////////////////////////////////////////////////////////////////////////////////////
// LLViewerMediaImpl
//////////////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index b103c48bd8..3ce9f1887c 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -115,6 +115,12 @@ class LLViewerMedia
// This is the comparitor used to sort the list.
static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2);
+
+ // For displaying the media first-run dialog.
+ static bool needsMediaFirstRun();
+ static void displayMediaFirstRun();
+ static bool firstRunCallback(const LLSD& notification, const LLSD& response);
+
};
// Implementation functions not exported into header file
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 0f7903a7a5..56dee6b34c 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -56,10 +56,6 @@ LLUUID LLViewerParcelMedia::sMediaRegionID;
viewer_media_t LLViewerParcelMedia::sMediaImpl;
-// Local functions
-bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel);
-
-
// static
void LLViewerParcelMedia::initClass()
{
@@ -112,12 +108,10 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
// First use warning
if( (!mediaUrl.empty() ||
!parcel->getMusicURL().empty())
- && gWarningSettings.getBOOL("FirstStreamingMedia") )
+ && LLViewerMedia::needsMediaFirstRun())
{
- LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
- boost::bind(callback_play_media, _1, _2, parcel));
+ LLViewerMedia::displayMediaFirstRun();
return;
-
}
// if we have a current (link sharing) url, use it instead
@@ -591,36 +585,6 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
};
}
-bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option == 0)
- {
- // user has elected to automatically play media.
- gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE);
- gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
- gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
- if(!gSavedSettings.getBOOL("AudioStreamingMedia"))
- gSavedSettings.setBOOL("AudioStreamingMedia", TRUE);
- // play media right now, if available
- LLViewerParcelMedia::play(parcel);
- // play music right now, if available
- if (parcel)
- {
- std::string music_url = parcel->getMusicURL();
- if (gAudiop && !music_url.empty())
- gAudiop->startInternetStream(music_url);
- }
- }
- else
- {
- gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
- gSavedSettings.setBOOL("AudioStreamingMusic", FALSE);
- }
- gWarningSettings.setBOOL("FirstStreamingMedia", FALSE);
- return false;
-}
-
// TODO: observer
/*
void LLViewerParcelMediaNavigationObserver::onNavigateComplete( const EventType& event_in )
diff --git a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml
index 4ece0fa3ba..897d959b98 100644
--- a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml
+++ b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml
@@ -5,6 +5,9 @@
height="108"
layout="topleft"
name="whitelist_entry"
+ single_instance="true"
+ help_topic="whitelist_entry"
+ title="WHITELIST ENTRY"
width="390">
<text type="string" length="1" bottom="20" follows="top|left" height="15" layout="topleft"