summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/ignorable_dialogs.xml15
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp72
-rw-r--r--indra/newview/llpaneloutfitsinventory.h2
-rw-r--r--indra/newview/llsidepanelappearance.cpp5
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp6
-rw-r--r--indra/newview/llviewermedia.cpp73
-rw-r--r--indra/newview/llviewermedia.h4
-rw-r--r--indra/newview/llviewerparcelmedia.cpp19
-rw-r--r--indra/newview/llviewerparcelmgr.cpp24
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml17
11 files changed, 107 insertions, 133 deletions
diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml
index ab18febccc..e825f13e82 100644
--- a/indra/newview/app_settings/ignorable_dialogs.xml
+++ b/indra/newview/app_settings/ignorable_dialogs.xml
@@ -177,21 +177,10 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>FirstStreamingMusic</key>
+ <key>FirstStreamingMedia</key>
<map>
<key>Comment</key>
- <string>Enables FirstStreamingMusic warning dialog</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>FirstStreamingVideo</key>
- <map>
- <key>Comment</key>
- <string>Enables FirstStreamingVideo warning dialog</string>
+ <string>Enables FirstStreamingMedia warning dialog</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index becc30832d..e0356bc091 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1929,8 +1929,7 @@ bool LLAppViewer::initConfiguration()
LLFirstUse::addConfigVariable("FirstSandbox");
LLFirstUse::addConfigVariable("FirstFlexible");
LLFirstUse::addConfigVariable("FirstDebugMenus");
- LLFirstUse::addConfigVariable("FirstStreamingMusic");
- LLFirstUse::addConfigVariable("FirstStreamingVideo");
+ LLFirstUse::addConfigVariable("FirstStreamingMedia");
LLFirstUse::addConfigVariable("FirstSculptedPrim");
LLFirstUse::addConfigVariable("FirstVoice");
LLFirstUse::addConfigVariable("FirstMedia");
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 8e14074de1..29fa4b319c 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -84,6 +84,14 @@ BOOL LLPanelOutfitsInventory::postBuild()
return TRUE;
}
+// virtual
+void LLPanelOutfitsInventory::onOpen(const LLSD& key)
+{
+ // Make sure we know which tab is selected, update the filter,
+ // and update verbs.
+ onTabChange();
+}
+
void LLPanelOutfitsInventory::updateVerbs()
{
if (mParent)
@@ -94,6 +102,7 @@ void LLPanelOutfitsInventory::updateVerbs()
if (mListCommands)
{
mListCommands->childSetVisible("look_edit_btn",sShowDebugEditor);
+ updateListCommands();
}
}
@@ -176,7 +185,6 @@ void LLPanelOutfitsInventory::onNew()
void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
{
- updateListCommands();
updateVerbs();
if (getRootFolder()->needsAutoRename() && items.size())
{
@@ -264,9 +272,11 @@ void LLPanelOutfitsInventory::updateListCommands()
{
bool trash_enabled = isActionEnabled("delete");
bool wear_enabled = isActionEnabled("wear");
+ bool make_outfit_enabled = isActionEnabled("make_outfit");
mListCommands->childSetEnabled("trash_btn", trash_enabled);
mListCommands->childSetEnabled("wear_btn", wear_enabled);
+ mListCommands->childSetEnabled("make_outfit_btn", make_outfit_enabled);
}
void LLPanelOutfitsInventory::onGearButtonClick()
@@ -303,6 +313,8 @@ void LLPanelOutfitsInventory::onClipboardAction(const LLSD& userdata)
{
std::string command_name = userdata.asString();
getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name);
+ updateListCommands();
+ updateVerbs();
}
void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata)
@@ -323,6 +335,7 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata)
{
onWearButtonClick();
}
+ // Note: This option has been removed from the gear menu.
if (command_name == "add")
{
onAdd();
@@ -343,20 +356,22 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata)
{
onClipboardAction("delete");
}
+ updateListCommands();
+ updateVerbs();
}
BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
{
const std::string command_name = userdata.asString();
- if (command_name == "delete")
+ if (command_name == "delete" || command_name == "remove")
{
BOOL can_delete = FALSE;
LLFolderView *folder = getActivePanel()->getRootFolder();
if (folder)
{
- can_delete = TRUE;
std::set<LLUUID> selection_set;
folder->getSelectionList(selection_set);
+ can_delete = (selection_set.size() > 0);
for (std::set<LLUUID>::iterator iter = selection_set.begin();
iter != selection_set.end();
++iter)
@@ -375,9 +390,9 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
LLFolderView *folder = getActivePanel()->getRootFolder();
if (folder)
{
- can_delete = TRUE;
std::set<LLUUID> selection_set;
folder->getSelectionList(selection_set);
+ can_delete = (selection_set.size() > 0);
for (std::set<LLUUID>::iterator iter = selection_set.begin();
iter != selection_set.end();
++iter)
@@ -391,10 +406,24 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
}
return FALSE;
}
+ if (command_name == "rename" ||
+ command_name == "delete_outfit")
+ {
+ return (getCorrectListenerForAction() != NULL) && hasItemsSelected();
+ }
+
+ if (command_name == "wear" ||
+ command_name == "make_outfit")
+ {
+ const BOOL is_my_outfits = (mActivePanel->getName() == "outfitslist_accordionpanel");
+ if (!is_my_outfits)
+ {
+ return FALSE;
+ }
+ }
+
if (command_name == "edit" ||
- command_name == "wear" ||
- command_name == "add" ||
- command_name == "remove"
+ command_name == "add"
)
{
return (getCorrectListenerForAction() != NULL);
@@ -402,6 +431,19 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
return TRUE;
}
+bool LLPanelOutfitsInventory::hasItemsSelected()
+{
+ bool has_items_selected = false;
+ LLFolderView *folder = getActivePanel()->getRootFolder();
+ if (folder)
+ {
+ std::set<LLUUID> selection_set;
+ folder->getSelectionList(selection_set);
+ has_items_selected = (selection_set.size() > 0);
+ }
+ return has_items_selected;
+}
+
bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept)
{
*accept = ACCEPT_NO;
@@ -425,17 +467,17 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy
void LLPanelOutfitsInventory::initTabPanels()
{
mTabPanels.resize(2);
+
+ LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel");
+ cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ mTabPanels[0] = cof_panel;
LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel");
myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY);
myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- mTabPanels[0] = myoutfits_panel;
- mActivePanel = myoutfits_panel;
+ mTabPanels[1] = myoutfits_panel;
-
- LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel");
- cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- mTabPanels[1] = cof_panel;
+ mActivePanel = mTabPanels[0];
for (tabpanels_vec_t::iterator iter = mTabPanels.begin();
iter != mTabPanels.end();
@@ -479,9 +521,7 @@ void LLPanelOutfitsInventory::onTabChange()
return;
}
mActivePanel->setFilterSubString(mFilterSubString);
-
- bool is_my_outfits = (mActivePanel->getName() == "outfitslist_accordionpanel");
- mListCommands->childSetEnabled("make_outfit_btn", is_my_outfits);
+ updateVerbs();
}
LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel()
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 1e084750a0..b117311775 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -53,6 +53,7 @@ public:
virtual ~LLPanelOutfitsInventory();
/*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
void onSearchEdit(const std::string& string);
void onAdd();
@@ -114,6 +115,7 @@ protected:
BOOL isActionEnabled(const LLSD& command_name);
void onCustomAction(const LLSD& command_name);
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
+ bool hasItemsSelected();
private:
LLPanel* mListCommands;
LLMenuGL* mMenuGearDefault;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index e2ce534c4f..0aefebce10 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -166,6 +166,11 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
refreshCurrentOutfitName();
updateVerbs();
+ if (mPanelOutfitsInventory)
+ {
+ mPanelOutfitsInventory->onOpen(key);
+ }
+
if(key.size() == 0)
return;
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 50cec3184d..0b8f66c5f3 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -215,6 +215,10 @@ void LLSidepanelTaskInfo::disableAll()
childSetVisible("E:", FALSE);
childSetVisible("N:", FALSE);
childSetVisible("F:", FALSE);
+
+ mOpenBtn->setEnabled(FALSE);
+ mPayBtn->setEnabled(FALSE);
+ mBuyBtn->setEnabled(FALSE);
}
void LLSidepanelTaskInfo::refresh()
@@ -1119,6 +1123,8 @@ void LLSidepanelTaskInfo::updateVerbs()
*/
mOpenBtn->setEnabled(enable_object_open());
+ mPayBtn->setEnabled(enable_pay_object());
+ mBuyBtn->setEnabled(enable_buy_object());
}
void LLSidepanelTaskInfo::onOpenButtonClicked()
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 0fc0afed3e..6e11788e0a 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -2541,76 +2541,3 @@ void LLViewerMediaImpl::setTextureID(LLUUID id)
}
}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-//static
-void LLViewerMedia::toggleMusicPlay(void*)
-{
-// FIXME: This probably doesn't belong here
-#if 0
- if (mMusicState != PLAYING)
- {
- mMusicState = PLAYING; // desired state
- if (gAudiop)
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if ( parcel )
- {
- gAudiop->startInternetStream(parcel->getMusicURL());
- }
- }
- }
- else
- {
- mMusicState = STOPPED; // desired state
- if (gAudiop)
- {
- gAudiop->stopInternetStream();
- }
- }
-#endif
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-//static
-void LLViewerMedia::toggleMediaPlay(void*)
-{
-// FIXME: This probably doesn't belong here
-#if 0
- if (LLViewerMedia::isMediaPaused())
- {
- LLViewerParcelMedia::start();
- }
- else if(LLViewerMedia::isMediaPlaying())
- {
- LLViewerParcelMedia::pause();
- }
- else
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (parcel)
- {
- LLViewerParcelMedia::play(parcel);
- }
- }
-#endif
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-//static
-void LLViewerMedia::mediaStop(void*)
-{
-// FIXME: This probably doesn't belong here
-#if 0
- LLViewerParcelMedia::stop();
-#endif
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-//static
-bool LLViewerMedia::isMusicPlaying()
-{
-// FIXME: This probably doesn't belong here
-// FIXME: make this work
- return false;
-}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 9119b783c2..5e4dd8ff30 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -99,14 +99,10 @@ class LLViewerMedia
static void setVolume(F32 volume);
static void updateMedia(void* dummy_arg = NULL);
- static bool isMusicPlaying();
static void initClass();
static void cleanupClass();
- static void toggleMusicPlay(void*);
- static void toggleMediaPlay(void*);
- static void mediaStop(void*);
static F32 getVolume();
static void muteListChanged();
static void setInWorldMediaDisabled(bool disabled);
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 86f0f4e04e..0f7903a7a5 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -34,6 +34,7 @@
#include "llviewerparcelmedia.h"
#include "llagent.h"
+#include "llaudioengine.h"
#include "llviewercontrol.h"
#include "llviewermedia.h"
#include "llviewerregion.h"
@@ -109,7 +110,9 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
std::string mediaCurrentUrl = std::string( parcel->getMediaCurrentURL());
// First use warning
- if( ! mediaUrl.empty() && gWarningSettings.getBOOL("FirstStreamingVideo") )
+ if( (!mediaUrl.empty() ||
+ !parcel->getMusicURL().empty())
+ && gWarningSettings.getBOOL("FirstStreamingMedia") )
{
LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
boost::bind(callback_play_media, _1, _2, parcel));
@@ -593,16 +596,28 @@ bool callback_play_media(const LLSD& notification, const LLSD& response, LLParce
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("FirstStreamingVideo", FALSE);
+ gWarningSettings.setBOOL("FirstStreamingMedia", FALSE);
return false;
}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 87a9eae028..5a5c4e7480 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -44,6 +44,7 @@
#include "llparcel.h"
#include "llsecondlifeurls.h"
#include "message.h"
+#include "llfloaterreg.h"
// Viewer includes
#include "llagent.h"
@@ -52,6 +53,7 @@
#include "llfirstuse.h"
#include "llfloaterbuyland.h"
#include "llfloatergroups.h"
+#include "llfloaternearbymedia.h"
#include "llfloatersellland.h"
#include "llfloatertools.h"
#include "llparcelselection.h"
@@ -1735,7 +1737,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else if (!gAudiop->getInternetStreamURL().empty())
{
- llinfos << "Stopping parcel music" << llendl;
+ llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
gAudiop->startInternetStream(LLStringUtil::null);
}
}
@@ -1754,15 +1756,19 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
void optionally_start_music(const std::string& music_url)
{
- if (gSavedSettings.getBOOL("AudioStreamingMusic") && gSavedSettings.getBOOL("AudioStreamingMedia"))
- {
- // Make the user click the start button on the overlay bar. JC
- // llinfos << "Starting parcel music " << music_url << llendl;
-
- // now only play music when you enter a new parcel if the control is in PLAY state
- // changed as part of SL-4878
- if ( gOverlayBar && gOverlayBar->musicPlaying())
+ if (gSavedSettings.getBOOL("AudioStreamingMusic") &&
+ gSavedSettings.getBOOL("AudioStreamingMedia"))
+ {
+ // only play music when you enter a new parcel if the UI control for this
+ // was not *explicitly* stopped by the user. (part of SL-4878)
+ LLFloaterNearbyMedia *nearby_media_floater = LLFloaterReg::findTypedInstance<LLFloaterNearbyMedia>("nearby_media");
+ if ((nearby_media_floater &&
+ nearby_media_floater->getParcelAudioAutoStart()) ||
+ // or they have expressed no opinion in the UI, but have autoplay on...
+ (!nearby_media_floater &&
+ gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING)))
{
+ llinfos << "Starting parcel music " << music_url << llendl;
gAudiop->startInternetStream(music_url);
}
}
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
index 7b88fca7c3..2c7a51f0e7 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
@@ -18,17 +18,6 @@
parameter="wear" />
</menu_item_call>
<menu_item_call
- label="Add To Current Outfit"
- layout="topleft"
- name="add">
- <on_click
- function="panel_outfits_inventory_gear_default.Custom.Action"
- parameter="add" />
- <on_enable
- function="panel_outfits_inventory_gear_default.Enable"
- parameter="add" />
- </menu_item_call>
- <menu_item_call
label="Remove From Current Outfit"
layout="topleft"
name="remove">
@@ -54,7 +43,7 @@
parameter="rename" />
</menu_item_call>
<menu_item_call
- label="Remove"
+ label="Remove Link"
layout="topleft"
name="remove_link">
<on_click
@@ -65,7 +54,7 @@
parameter="remove_link" />
</menu_item_call>
<menu_item_call
- label="Delete"
+ label="Delete Outfit"
layout="topleft"
name="delete">
<on_click
@@ -73,6 +62,6 @@
parameter="delete" />
<on_enable
function="panel_outfits_inventory_gear_default.Enable"
- parameter="delete" />
+ parameter="delete_outfit" />
</menu_item_call>
</menu>