summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llenvironment.cpp15
-rw-r--r--indra/newview/llenvironment.h2
-rw-r--r--indra/newview/llinventorybridge.cpp10
-rw-r--r--indra/newview/llviewerinventory.cpp35
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml29
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_add.xml29
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_water.xml9
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml5
11 files changed, 151 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 50f3f4f979..ad4a1fca6a 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -135,6 +135,17 @@ bool LLEnvironment::canEdit() const
return true;
}
+bool LLEnvironment::isExtendedEnvironmentEnabled() const
+{
+ return !gAgent.getRegionCapability("ExtEnvironment").empty();
+}
+
+bool LLEnvironment::isInventoryEnabled() const
+{
+ return (!gAgent.getRegionCapability("UpdateSettingsAgentInventory").empty() &&
+ !gAgent.getRegionCapability("UpdateSettingsTaskInventory").empty());
+}
+
LLEnvironment::connection_t LLEnvironment::setSkyListChange(const LLEnvironment::change_signal_t::slot_type& cb)
{
@@ -759,7 +770,7 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
//=========================================================================
void LLEnvironment::requestRegion()
{
- if (gAgent.getRegionCapability("ExtEnvironment").empty())
+ if (!isExtendedEnvironmentEnabled())
{
LLEnvironmentRequest::initiate();
return;
@@ -770,7 +781,7 @@ void LLEnvironment::requestRegion()
void LLEnvironment::updateRegion(LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset)
{
- if (gAgent.getRegionCapability("ExtEnvironment").empty())
+ if (!isExtendedEnvironmentEnabled())
{
LLEnvironmentApply::initiateRequest( LLSettingsVODay::convertToLegacy(pday) );
return;
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index cb6cd11608..d8cb61d0bb 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -134,6 +134,8 @@ public:
const UserPrefs & getPreferences() const { return mUserPrefs; }
bool canEdit() const;
+ bool isExtendedEnvironmentEnabled() const;
+ bool isInventoryEnabled() const;
LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); }
LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); }
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index fbc35e9192..9311861d83 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -82,6 +82,8 @@
#include "lllandmarkactions.h"
#include "llpanellandmarks.h"
+#include "llenvironment.h"
+
#include <boost/shared_ptr.hpp>
void copy_slurl_to_clipboard_callback_inv(const std::string& slurl);
@@ -4029,10 +4031,18 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
items.push_back(std::string("New Gesture"));
items.push_back(std::string("New Clothes"));
items.push_back(std::string("New Body Parts"));
+ items.push_back(std::string("New Settings"));
items.push_back(std::string("upload_def"));
+
+ if (!LLEnvironment::instance().isInventoryEnabled())
+ {
+ disabled_items.push_back("New Settings");
+ }
+
}
}
getClipboardEntries(false, items, disabled_items, flags);
+
}
else
{
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f5c08a4b0f..8665fb3234 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -70,6 +70,7 @@
#include "llfloaterperms.h"
#include "llclipboard.h"
#include "llhttpretrypolicy.h"
+#include "llsettingsvo.h"
// do-nothing ops for use in callbacks.
void no_op_inventory_func(const LLUUID&) {}
@@ -1820,6 +1821,40 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge,
LLInventoryType::IT_GESTURE,
PERM_ALL); // overridden in create_new_item
}
+ else if (("sky" == type_name) || ("water" == type_name) || ("daycycle" == type_name))
+ {
+ LL_WARNS("LAPRAS") << "Creating settings object of type: '" << type_name << "'" << LL_ENDL;
+
+ LLSettingsBase::ptr_t settings;
+ std::string name;
+
+ if ("sky" == type_name)
+ {
+ settings = LLSettingsVOSky::buildDefaultSky();
+ name = LLTrans::getString("New Sky");
+ }
+ else if ("water" == type_name)
+ {
+ settings = LLSettingsVOWater::buildDefaultWater();
+ name = LLTrans::getString("New Water");
+ }
+ else if ("daycycle" == type_name)
+ {
+ settings = LLSettingsVODay::buildDefaultDayCycle();
+ name = LLTrans::getString("New Daycycle");
+ }
+ else
+ LL_ERRS(LOG_INV) << "Unknown settings type: '" << type_name << "'" << LL_ENDL;
+
+ if (!settings)
+ {
+ LL_WARNS(LOG_INV) << "Unable to create a default setting object of type '" << type_name << "'" << LL_ENDL;
+ return;
+ }
+
+ settings->setName(name);
+ LLSettingsVOBase::createInventoryItem(settings);
+ }
else
{
// Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary.
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 5b45364127..29915788f1 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -322,6 +322,35 @@
</menu_item_call>
</menu>
<menu
+ label="New Settings"
+ layout="topleft"
+ name="New Settings">
+ <menu_item_call
+ label="New Sky"
+ layout="topleft"
+ name="New Sky">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="sky"/>
+ </menu_item_call>
+ <menu_item_call
+ label="New Water"
+ layout="topleft"
+ name="New Water">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="water"/>
+ </menu_item_call>
+ <menu_item_call
+ label="New Day Cycle"
+ layout="topleft"
+ name="New Day Cycle">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="daycycle"/>
+ </menu_item_call>
+ </menu>
+ <menu
label="Use as default for"
layout="topleft"
name="upload_def">
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index afeb1bf226..7c31bfe54d 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -245,4 +245,33 @@
parameter="eyes" />
</menu_item_call>
</menu>
+ <menu
+ label="New Settings"
+ layout="topleft"
+ name="New Settings">
+ <menu_item_call
+ label="New Sky"
+ layout="topleft"
+ name="New Sky">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="sky"/>
+ </menu_item_call>
+ <menu_item_call
+ label="New Water"
+ layout="topleft"
+ name="New Water">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="water"/>
+ </menu_item_call>
+ <menu_item_call
+ label="New Day Cycle"
+ layout="topleft"
+ name="New Day Cycle">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="daycycle"/>
+ </menu_item_call>
+ </menu>
</menu> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
index 643994b6b1..ffa7df209b 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
@@ -113,6 +113,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -134,6 +135,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -155,6 +157,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -183,6 +186,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -204,6 +208,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -225,6 +230,7 @@
decimal_digits="1"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
index 2a52f1a96e..b88ac64323 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
@@ -54,6 +54,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -75,6 +76,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -107,6 +109,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0"
layout="topleft"
label="X:"
@@ -119,6 +122,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0"
layout="topleft"
label="Y:"
@@ -168,6 +172,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -181,6 +186,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="0"
@@ -194,6 +200,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="0"
@@ -216,6 +223,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -229,6 +237,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="0"
@@ -242,6 +251,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="0"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
index c0bd123fbc..0eb4e5be94 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
@@ -53,6 +53,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -74,6 +75,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
@@ -95,6 +97,7 @@
decimal_digits="2"
follows="left|top"
height="10"
+ increment="0.01"
initial_value="0"
layout="topleft"
left_delta="5"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_water.xml b/indra/newview/skins/default/xui/en/panel_settings_water.xml
index fe088d98cf..eb4664616e 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_water.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_water.xml
@@ -63,6 +63,7 @@
decimal_digits="1"
follows="left|top|right"
height="10"
+ increment="0.01"
initial_value="0"
layout="top"
left_delta="15"
@@ -81,6 +82,7 @@
decimal_digits="1"
follows="left|top|right"
height="10"
+ increment="0.01"
initial_value="0"
layout="top"
left_delta="15"
@@ -158,6 +160,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0"
layout="topleft"
label="X:"
@@ -170,6 +173,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0"
layout="topleft"
label="Y:"
@@ -205,6 +209,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0"
layout="topleft"
label="X:"
@@ -217,6 +222,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0"
layout="topleft"
label="Y:"
@@ -241,6 +247,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0.7"
layout="topleft"
label="X:"
@@ -252,6 +259,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0.7"
layout="topleft"
max_val="10"
@@ -262,6 +270,7 @@
<slider
decimal_digits="1"
follows="left|top"
+ increment="0.01"
initial_value="0.7"
layout="topleft"
max_val="10"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 5f30a7e87d..55a871d120 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3850,6 +3850,11 @@ Abuse Report</string>
<string name="Female - Shrug">Female - Shrug</string>
<string name="Female - Stick tougue out">Female - Stick tongue out</string>
<string name="Female - Wow">Female - Wow</string>
+ <!-- settings -->
+ <string name="New Daycycle">New Daycycle</string>
+ <string name="New Water">New Water</string>
+ <string name="New Sky">New Sky</string>
+
<string name="/bow">/bow</string>
<string name="/clap">/clap</string>