summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp52
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp32
-rw-r--r--indra/newview/llpanelmaininventory.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml29
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml32
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml11
6 files changed, 127 insertions, 40 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 827e1d992d..6b748a9103 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -189,9 +189,6 @@ BOOL LLFloaterEditExtDayCycle::postBuild()
void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
{
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT);
- LLEnvironment::instance().updateEnvironment();
-
mEditDay.reset();
if (key.has(KEY_INVENTORY_ID))
{
@@ -360,7 +357,7 @@ void LLFloaterEditExtDayCycle::onAddTrack()
LLSettingsBase::ptr_t setting;
if ((mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, FRAME_SLOP_FACTOR)).second)
{
- LL_WARNS("SETTINGS") << "Attempt to add new frame too close to existing frame." << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Attempt to add new frame too close to existing frame." << LL_ENDL;
return;
}
@@ -591,7 +588,7 @@ void LLFloaterEditExtDayCycle::selectFrame(F32 frame, F32 slop_factor)
mTimeSlider->setCurSliderValue(frame);
// block or update tabs according to new selection
updateTabs();
- LLEnvironment::instance().updateEnvironment();
+// LLEnvironment::instance().updateEnvironment();
}
void LLFloaterEditExtDayCycle::clearTabs()
@@ -802,19 +799,22 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
{
if (inventoryId.isNull())
{
- LL_WARNS("SETTINGS") << "Attempt to load NULL inventory ID" << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Attempt to load NULL inventory ID" << LL_ENDL;
mInventoryItem = nullptr;
mInventoryId.setNull();
return;
}
mInventoryId = inventoryId;
- LL_INFOS("SETTINGS") << "Setting edit inventory item to " << mInventoryId << "." << LL_ENDL;
+ LL_INFOS("ENVIRONMENT") << "Setting edit inventory item to " << mInventoryId << "." << LL_ENDL;
mInventoryItem = gInventory.getItem(mInventoryId);
if (!mInventoryItem)
{
- LL_WARNS("SETTINGS") << "Could not find inventory item with Id = " << mInventoryId << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Could not find inventory item with Id = " << mInventoryId << LL_ENDL;
+
+ LLNotificationsUtil::add("CantFindInvItem");
+ closeFloater();
mInventoryId.setNull();
mInventoryItem = nullptr;
return;
@@ -822,7 +822,11 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
if (mInventoryItem->getAssetUUID().isNull())
{
- LL_WARNS("SETTINGS") << "Asset ID in inventory item is NULL (" << mInventoryId << ")" << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Asset ID in inventory item is NULL (" << mInventoryId << ")" << LL_ENDL;
+
+ LLNotificationsUtil::add("UnableEditItem");
+ closeFloater();
+
mInventoryId.setNull();
mInventoryItem = nullptr;
return;
@@ -837,14 +841,15 @@ void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::pt
if (!settings || status)
{
LLSD args;
- args["DESC"] = (mInventoryItem) ? mInventoryItem->getName() : "Unknown";
+ args["NAME"] = (mInventoryItem) ? mInventoryItem->getName() : "Unknown";
LLNotificationsUtil::add("FailedToFindSettings", args);
closeFloater();
return;
}
mEditDay = std::dynamic_pointer_cast<LLSettingsDay>(settings);
updateEditEnvironment();
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().updateEnvironment();
synchronizeTabs();
updateTabs();
refresh();
@@ -865,11 +870,13 @@ void LLFloaterEditExtDayCycle::loadLiveEnvironment(LLEnvironment::EnvSelection_t
if (!mEditDay)
{
- LL_WARNS("SETTINGS") << "Unable to load environment " << env << " building default." << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Unable to load environment " << env << " building default." << LL_ENDL;
mEditDay = LLSettingsVODay::buildDefaultDayCycle();
}
updateEditEnvironment();
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().updateEnvironment();
synchronizeTabs();
updateTabs();
refresh();
@@ -1010,11 +1017,14 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where)
if (handle)
parcel = handle->getParcel();
- if (!parcel)
+ if (!parcel || (parcel->getLocalID() == INVALID_PARCEL_ID))
parcel = LLViewerParcelMgr::instance().getAgentParcel();
- if (!parcel)
+ if ((!parcel) || (parcel->getLocalID() == INVALID_PARCEL_ID))
+ {
+ LL_WARNS("ENVIRONMENT") << "Can not identify parcel. Not applying." << LL_ENDL;
return;
+ }
LLEnvironment::instance().updateParcel(parcel->getLocalID(), mEditDay, -1, -1);
}
@@ -1032,7 +1042,13 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where)
void LLFloaterEditExtDayCycle::onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results)
{
- LL_WARNS("ENVIRONMENT") << "Inventory item " << inventory_id << " has been created with asset " << asset_id << " results are:" << results << LL_ENDL;
+ LL_INFOS("ENVIRONMENT") << "Inventory item " << inventory_id << " has been created with asset " << asset_id << " results are:" << results << LL_ENDL;
+
+ if (inventory_id.isNull() || !results["success"].asBoolean())
+ {
+ LLNotificationsUtil::add("CantCreateInventory");
+ return;
+ }
setFocus(TRUE); // Call back the focus...
loadInventoryItem(inventory_id);
@@ -1060,7 +1076,9 @@ void LLFloaterEditExtDayCycle::doImportFromDisk()
LLSettingsDay::ptr_t legacyday = LLEnvironment::createDayCycleFromLegacyPreset(filename);
if (!legacyday)
- { // *TODO* Put up error dialog here. Could not create water from filename
+ {
+ LLSD args(LLSDMap("FILE", filename));
+ LLNotificationsUtil::add("WLImportFail", args);
return;
}
@@ -1189,7 +1207,7 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID asset_id, LLSettings
{
if (!settings || status)
{
- LL_WARNS("SETTINGS") << "Could not load asset " << asset_id << " into frame. status=" << status << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Could not load asset " << asset_id << " into frame. status=" << status << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index d926697117..7efd45ca56 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -202,11 +202,26 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId)
if (!mInventoryItem)
{
LL_WARNS("SETTINGS") << "Could not find inventory item with Id = " << mInventoryId << LL_ENDL;
+ LLNotificationsUtil::add("CantFindInvItem");
+ closeFloater();
+
+ mInventoryId.setNull();
+ mInventoryItem = nullptr;
+ return;
+ }
+
+ if (mInventoryItem->getAssetUUID().isNull())
+ {
+ LL_WARNS("ENVIRONMENT") << "Asset ID in inventory item is NULL (" << mInventoryId << ")" << LL_ENDL;
+ LLNotificationsUtil::add("UnableEditItem");
+ closeFloater();
+
mInventoryId.setNull();
mInventoryItem = nullptr;
return;
}
+
LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(),
[this](LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status, LLExtStat) { onAssetLoaded(asset_id, settins, status); });
}
@@ -216,7 +231,7 @@ void LLFloaterFixedEnvironment::onAssetLoaded(LLUUID asset_id, LLSettingsBase::p
if (!settings || status)
{
LLSD args;
- args["DESC"] = (mInventoryItem) ? mInventoryItem->getName() : "Unknown";
+ args["NAME"] = (mInventoryItem) ? mInventoryItem->getName() : "Unknown";
LLNotificationsUtil::add("FailedToFindSettings", args);
closeFloater();
return;
@@ -329,6 +344,12 @@ void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inven
{
LL_WARNS("ENVIRONMENT") << "Inventory item " << inventory_id << " has been created with asset " << asset_id << " results are:" << results << LL_ENDL;
+ if (inventory_id.isNull() || !results["success"].asBoolean())
+ {
+ LLNotificationsUtil::add("CantCreateInventory");
+ return;
+ }
+
setFocus(TRUE); // Call back the focus...
loadInventoryItem(inventory_id);
}
@@ -427,7 +448,9 @@ void LLFloaterFixedEnvironmentWater::doImportFromDisk()
LLSettingsWater::ptr_t legacywater = LLEnvironment::createWaterFromLegacyPreset(filename);
if (!legacywater)
- { // *TODO* Put up error dialog here. Could not create water from filename
+ {
+ LLSD args(LLSDMap("FILE", filename));
+ LLNotificationsUtil::add("WLImportFail", args);
return;
}
@@ -504,7 +527,10 @@ void LLFloaterFixedEnvironmentSky::doImportFromDisk()
LLSettingsSky::ptr_t legacysky = LLEnvironment::createSkyFromLegacyPreset(filename);
if (!legacysky)
- { // *TODO* Put up error dialog here. Could not create water from filename
+ {
+ LLSD args(LLSDMap("FILE", filename));
+ LLNotificationsUtil::add("WLImportFail", args);
+
return;
}
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index db9d61c637..a9ad41e6f7 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -905,6 +905,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
getChild<LLUICtrl>("check_sound")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND));
getChild<LLUICtrl>("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
getChild<LLUICtrl>("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
+ getChild<LLUICtrl>("check_settings")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SETTINGS));
getChild<LLUICtrl>("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
getChild<LLUICtrl>("check_created_by_me")->setValue(show_created_by_me);
@@ -997,6 +998,12 @@ void LLFloaterInventoryFinder::draw()
filtered_by_all_types = FALSE;
}
+ if (!getChild<LLUICtrl>("check_settings")->getValue())
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_SETTINGS);
+ filtered_by_all_types = FALSE;
+ }
+
if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE))
{
// don't include folders in filter, unless I've selected everything or filtering by date
@@ -1114,7 +1121,8 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data)
self->getChild<LLUICtrl>("check_script")->setValue(TRUE);
self->getChild<LLUICtrl>("check_sound")->setValue(TRUE);
self->getChild<LLUICtrl>("check_texture")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_snapshot")->setValue(TRUE);
+ self->getChild<LLUICtrl>("check_snapshot")->setValue(TRUE);
+ self->getChild<LLUICtrl>("check_settings")->setValue(TRUE);
}
//static
@@ -1135,6 +1143,7 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data)
self->getChild<LLUICtrl>("check_sound")->setValue(FALSE);
self->getChild<LLUICtrl>("check_texture")->setValue(FALSE);
self->getChild<LLUICtrl>("check_snapshot")->setValue(FALSE);
+ self->getChild<LLUICtrl>("check_settings")->setValue(FALSE);
}
//////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
index 1b4992b4ca..7142fea0ea 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
- height="468"
+ height="488"
layout="topleft"
name="Inventory Finder"
help_topic="inventory_finder"
@@ -212,6 +212,23 @@
name="check_snapshot"
top_delta="0"
width="126" />
+ <icon
+ height="16"
+ image_name="Inv_Settings"
+ layout="topleft"
+ left="8"
+ mouse_opaque="true"
+ name="icon_settings"
+ top="262"
+ width="16" />
+ <check_box
+ height="16"
+ label="Settings"
+ layout="topleft"
+ left_pad="2"
+ name="check_settings"
+ top_delta="0"
+ width="126" />
<button
follows="left|top"
height="20"
@@ -220,7 +237,7 @@
layout="topleft"
left="8"
name="All"
- top="262"
+ top="282"
width="100" />
<button
height="20"
@@ -274,7 +291,7 @@
width="260"/>
<check_box
height="16"
- top="352"
+ top="372"
label="Since Logoff"
layout="topleft"
left_delta="0"
@@ -290,7 +307,7 @@
layout="topleft"
left_delta="0"
name="- OR -"
- top="370"
+ top="390"
width="144">
- OR -
</text>
@@ -298,7 +315,7 @@
height="16"
layout="topleft"
name="date_search_direction"
- top="388"
+ top="408"
left="8"
width="270">
<radio_item
@@ -368,6 +385,6 @@
layout="topleft"
name="Close"
right="-6"
- top="434"
+ top="454"
width="76" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index d4881d3cba..b7a6cb9287 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -643,17 +643,6 @@
name="Environment"
tear_off="true">
<menu_item_check
- label="Pause Clouds"
- name="pauseclouds">
- <menu_item_check.on_click
- function="World.EnvSettings"
- parameter="pauseclouds" />
- <menu_item_check.on_check
- function="World.EnableEnvSettings"
- parameter="pauseclouds" />
- </menu_item_check>
- <menu_item_separator/>
- <menu_item_check
label="Sunrise"
name="Sunrise">
<menu_item_check.on_click
@@ -695,7 +684,6 @@
function="World.EnableEnvSettings"
parameter="midnight" />
</menu_item_check>
- <menu_item_separator/>
<menu_item_check
label="Use Region Settings"
name="Use Region Settings">
@@ -706,6 +694,26 @@
function="World.EnableEnvSettings"
parameter="region" />
</menu_item_check>
+ <menu_item_separator/>
+ <menu_item
+ label="My Environments..."
+ name="My Environments">
+ <menu_item_check.on_click
+ function="World.MyEnvirons"
+ parameter="my_environs" />
+ </menu_item>
+ <menu_item_separator/>
+ <menu_item_check
+ label="Pause Clouds"
+ name="pauseclouds">
+ <menu_item_check.on_click
+ function="World.EnvSettings"
+ parameter="pauseclouds" />
+ <menu_item_check.on_check
+ function="World.EnableEnvSettings"
+ parameter="pauseclouds" />
+ </menu_item_check>
+
</menu>
<!--
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index fcabf1059e..eb4f658495 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -11101,7 +11101,7 @@ Cannot create large prims that intersect other residents. Please re-try when ot
name="FailedToFindSettings"
persist="true"
type="alertmodal">
-Failed to find the settings named [DESC] in database.
+Could not load the settings for [NAME] from the database.
<tag>fail</tag>
</notification>
@@ -11131,5 +11131,14 @@ Unable to apply those settings to the environment.
This Region does not support environmental settings.
<tag>fail</tag>
</notification>
+
+ <notification
+ icon="notify.tga"
+ name="WLImportFail"
+ persist="true"
+ type="alertmodal">
+Unable to import legacy Windlight settings from [FILE].
+ <tag>fail</tag>
+ </notification>
</notifications>