summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llinventory/llsettingsbase.cpp1
-rw-r--r--indra/llinventory/llsettingsbase.h1
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp140
-rw-r--r--indra/newview/llfloatereditextdaycycle.h5
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp60
-rw-r--r--indra/newview/llfloaterfixedenvironment.h5
-rw-r--r--indra/newview/llsettingsvo.cpp39
-rw-r--r--indra/newview/llsettingsvo.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_fixedenvironment.xml2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml17
10 files changed, 211 insertions, 62 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 5283a8dc8a..2adbb213e6 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -58,6 +58,7 @@ const std::string LLSettingsBase::SETTING_FLAGS("flags");
const U32 LLSettingsBase::FLAG_NOCOPY(0x01 << 0);
const U32 LLSettingsBase::FLAG_NOMOD(0x01 << 1);
+const U32 LLSettingsBase::FLAG_NOTRANS(0x01 << 2);
//=========================================================================
LLSettingsBase::LLSettingsBase():
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h
index a90cec6323..aea1bc3fde 100644
--- a/indra/llinventory/llsettingsbase.h
+++ b/indra/llinventory/llsettingsbase.h
@@ -74,6 +74,7 @@ public:
static const U32 FLAG_NOCOPY;
static const U32 FLAG_NOMOD;
+ static const U32 FLAG_NOTRANS;
typedef std::map<std::string, S32> parammapping_t;
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 270d772948..53deb8dadb 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -138,7 +138,10 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) :
mScratchSky(),
mScratchWater(),
mIsPlaying(false),
- mIsDirty(false)
+ mIsDirty(false),
+ mCanCopy(false),
+ mCanMod(false),
+ mMakeNoTrans(false)
{
mCommitCallbackRegistrar.add(EVNT_DAYTRACK, [this](LLUICtrl *ctrl, const LLSD &data) { onTrackSelectionCallback(data); });
@@ -365,8 +368,10 @@ void LLFloaterEditExtDayCycle::refresh()
{
LLLineEditor* name_field = getChild<LLLineEditor>(TXT_DAY_NAME);
name_field->setText(mEditDay->getName());
+ name_field->setEnabled(mCanMod);
}
+
bool is_inventory_avail = canUseInventory();
bool show_commit = ((mEditContext == CONTEXT_PARCEL) || (mEditContext == CONTEXT_REGION));
@@ -380,12 +385,15 @@ void LLFloaterEditExtDayCycle::refresh()
mFlyoutControl->setMenuItemVisible(ACTION_APPLY_REGION, show_apply);
mFlyoutControl->setMenuItemEnabled(ACTION_COMMIT, show_commit && !mCommitSignal.empty());
- mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail);
- mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail);
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && !mInventoryId.isNull());
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail && mCanCopy);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_LOCAL, true);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_PARCEL, canApplyParcel() && show_apply);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_REGION, canApplyRegion() && show_apply);
+ mImportButton->setEnabled(mCanMod);
+ mLoadFrame->setEnabled(mCanMod);
+
LLFloater::refresh();
}
@@ -597,7 +605,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data)
keymap_t::iterator it = mSliderKeyMap.find(curslider);
if (it != mSliderKeyMap.end())
{
- if (gKeyboard->currentMask(TRUE) == MASK_SHIFT && mShiftCopyEnabled)
+ if (gKeyboard->currentMask(TRUE) == MASK_SHIFT && mShiftCopyEnabled && mCanMod)
{
// don't move the point/frame as long as shift is pressed and user is attempting to copy
// handleKeyUp will do the move if user releases key too early.
@@ -631,7 +639,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data)
}
else
{
- if (mEditDay->moveTrackKeyframe(mCurrentTrack, (*it).second.mFrame, sliderpos))
+ if (mEditDay->moveTrackKeyframe(mCurrentTrack, (*it).second.mFrame, sliderpos) && mCanMod)
{
(*it).second.mFrame = sliderpos;
}
@@ -701,7 +709,7 @@ void LLFloaterEditExtDayCycle::checkAndConfirmSettingsLoss(on_confirm_fn cb)
// create and show confirmation textbox
LLNotificationsUtil::add("SettingsConfirmLoss", args, LLSD(),
- [this, cb](const LLSD&notif, const LLSD&resp)
+ [cb](const LLSD&notif, const LLSD&resp)
{
(void)this;
S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
@@ -824,42 +832,6 @@ void LLFloaterEditExtDayCycle::updateSkyTabs(const LLSettingsSkyPtr_t &p_sky)
}
}
-void LLFloaterEditExtDayCycle::setWaterTabsEnabled(BOOL enable)
-{
- LLView* tab_container = mWaterTabLayoutContainer->getChild<LLView>(TABS_WATER); //can't extract panels directly, since it is in 'tuple'
- LLPanelSettingsWaterMainTab* panel = dynamic_cast<LLPanelSettingsWaterMainTab*>(tab_container->getChildView("water_panel"));
- if (panel)
- {
- panel->setEnabled(enable);
- panel->setAllChildrenEnabled(enable);
- }
-}
-
-void LLFloaterEditExtDayCycle::setSkyTabsEnabled(BOOL enable)
-{
- LLView* tab_container = mSkyTabLayoutContainer->getChild<LLView>(TABS_SKYS); //can't extract panels directly, since they are in 'tuple'
-
- LLPanelSettingsSky* panel;
- panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("atmosphere_panel"));
- if (panel)
- {
- panel->setEnabled(enable);
- panel->setAllChildrenEnabled(enable);
- }
- panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("clouds_panel"));
- if (panel)
- {
- panel->setEnabled(enable);
- panel->setAllChildrenEnabled(enable);
- }
- panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("moon_panel"));
- if (panel)
- {
- panel->setEnabled(enable);
- panel->setAllChildrenEnabled(enable);
- }
-}
-
void LLFloaterEditExtDayCycle::updateButtons()
{
// This logic appears to work in reverse, the add frame button
@@ -870,8 +842,8 @@ void LLFloaterEditExtDayCycle::updateButtons()
//bool can_add = static_cast<bool>(settings);
//mAddFrameButton->setEnabled(can_add);
//mDeleteFrameButton->setEnabled(!can_add);
- mAddFrameButton->setEnabled(true);
- mDeleteFrameButton->setEnabled(true);
+ mAddFrameButton->setEnabled(true && mCanMod);
+ mDeleteFrameButton->setEnabled(true && mCanMod);
}
void LLFloaterEditExtDayCycle::updateSlider()
@@ -974,9 +946,11 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
{
if (inventoryId.isNull())
{
- LL_WARNS("ENVDAYEDIT") << "Attempt to load NULL inventory ID" << LL_ENDL;
mInventoryItem = nullptr;
mInventoryId.setNull();
+ mCanCopy = true;
+ mCanMod = true;
+ mMakeNoTrans = false;
return;
}
@@ -1007,6 +981,9 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
return;
}
+ mCanCopy = mInventoryItem->getPermissions().allowCopyBy(gAgent.getID());
+ mCanMod = mInventoryItem->getPermissions().allowModifyBy(gAgent.getID());
+
LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(),
[this](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoaded(asset_id, settings, status); });
}
@@ -1022,6 +999,16 @@ void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::pt
return;
}
+ if (mCanCopy)
+ settings->clearFlag(LLSettingsBase::FLAG_NOCOPY);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOCOPY);
+
+ if (mCanMod)
+ settings->clearFlag(LLSettingsBase::FLAG_NOMOD);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOMOD);
+
setEditDayCycle(std::dynamic_pointer_cast<LLSettingsDay>(settings));
}
@@ -1125,8 +1112,7 @@ void LLFloaterEditExtDayCycle::setTabsData(LLTabContainer * tabcontainer, const
if (panel)
{
panel->setSettings(settings);
- panel->setEnabled(editable);
- panel->setAllChildrenEnabled(editable);
+ panel->setCanChangeSettings(editable & mCanMod);
}
}
}
@@ -1223,6 +1209,19 @@ void LLFloaterEditExtDayCycle::onInventoryCreated(LLUUID asset_id, LLUUID invent
return;
}
+ if (mInventoryItem)
+ {
+ LLPermissions perms = mInventoryItem->getPermissions();
+
+ LLInventoryItem *created_item = gInventory.getItem(mInventoryId);
+
+ if (created_item)
+ {
+ created_item->setPermissions(perms);
+ created_item->updateServer(false);
+ }
+ }
+
clearDirtyFlag();
setFocus(TRUE); // Call back the focus...
loadInventoryItem(inventory_id);
@@ -1257,6 +1256,8 @@ void LLFloaterEditExtDayCycle::doImportFromDisk()
return;
}
+ loadInventoryItem(LLUUID::null);
+
mCurrentTrack = 1;
setDirtyFlag();
setEditDayCycle(legacyday);
@@ -1405,13 +1406,52 @@ void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID asset_id)
void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 track, LLSettingsBase::TrackPosition frame)
{
+ std::function<void()> cb = [this, settings, frame, track]()
+ {
+ mEditDay->setSettingsAtKeyframe(settings, frame, track);
+ reblendSettings();
+ synchronizeTabs();
+ };
+
if (!settings || status)
{
LL_WARNS("ENVDAYEDIT") << "Could not load asset " << asset_id << " into frame. status=" << status << LL_ENDL;
return;
}
- mEditDay->setSettingsAtKeyframe(settings, frame, track);
- reblendSettings();
- synchronizeTabs();
+ LLFloaterSettingsPicker *picker = static_cast<LLFloaterSettingsPicker *>(mInventoryFloater.get());
+ LLInventoryItem *inv_item(nullptr);
+
+ if (picker)
+ {
+ inv_item = picker->findItem(asset_id, false, false);
+ }
+
+ if (inv_item)
+ {
+ if (mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ {
+ if (!inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ {
+ LLSD args;
+
+ // create and show confirmation textbox
+ LLNotificationsUtil::add("SettingsMakeNoTrans", args, LLSD(),
+ [this, cb](const LLSD&notif, const LLSD&resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ mMakeNoTrans = true;
+ mEditDay->setFlag(LLSettingsBase::FLAG_NOTRANS);
+ cb();
+ }
+ });
+ return;
+ }
+ }
+
+ }
+
+ cb();
}
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index ba269dd538..c64ed3ff5a 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -125,8 +125,6 @@ private:
void updateTabs();
void updateWaterTabs(const LLSettingsWaterPtr_t &p_water);
void updateSkyTabs(const LLSettingsSkyPtr_t &p_sky);
- void setWaterTabsEnabled(BOOL enable);
- void setSkyTabsEnabled(BOOL enable);
void updateButtons();
void updateSlider(); //generate sliders from current track
void updateTimeAndLabel();
@@ -201,6 +199,9 @@ private:
F32 mPlayStartFrame; // an env frame
bool mIsPlaying;
bool mIsDirty;
+ bool mCanCopy;
+ bool mCanMod;
+ bool mMakeNoTrans;
edit_commit_signal_t mCommitSignal;
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 1200bf8183..4b420888a0 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -87,7 +87,9 @@ LLFloaterFixedEnvironment::LLFloaterFixedEnvironment(const LLSD &key) :
mFlyoutControl(nullptr),
mInventoryId(),
mInventoryItem(nullptr),
- mIsDirty(false)
+ mIsDirty(false),
+ mCanCopy(false),
+ mCanMod(false)
{
}
@@ -168,12 +170,13 @@ void LLFloaterFixedEnvironment::refresh()
bool is_inventory_avail = canUseInventory();
- mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail);
- mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail);
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && !mInventoryId.isNull());
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail && mCanCopy);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_PARCEL, canApplyParcel());
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_REGION, canApplyRegion());
mTxtName->setValue(mSettings->getName());
+ mTxtName->setEnabled(mCanMod);
S32 count = mTab->getTabCount();
@@ -181,7 +184,10 @@ void LLFloaterFixedEnvironment::refresh()
{
LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(mTab->getPanelByIndex(idx));
if (panel)
+ {
panel->refresh();
+ panel->setCanChangeSettings(mCanMod);
+ }
}
}
@@ -221,6 +227,8 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId)
{
mInventoryItem = nullptr;
mInventoryId.setNull();
+ mCanMod = true;
+ mCanCopy = true;
return;
}
@@ -250,9 +258,11 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId)
return;
}
+ mCanCopy = mInventoryItem->getPermissions().allowCopyBy(gAgent.getID());
+ mCanMod = mInventoryItem->getPermissions().allowModifyBy(gAgent.getID());
LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(),
- [this](LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status, LLExtStat) { onAssetLoaded(asset_id, settins, status); });
+ [this](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoaded(asset_id, settings, status); });
}
@@ -265,7 +275,7 @@ void LLFloaterFixedEnvironment::checkAndConfirmSettingsLoss(LLFloaterFixedEnviro
// create and show confirmation textbox
LLNotificationsUtil::add("SettingsConfirmLoss", args, LLSD(),
- [this, cb](const LLSD&notif, const LLSD&resp)
+ [cb](const LLSD&notif, const LLSD&resp)
{
(void)this;
S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
@@ -297,6 +307,9 @@ void LLFloaterFixedEnvironment::onAssetLoaded(LLUUID asset_id, LLSettingsBase::p
}
mSettings = settings;
+ if (mInventoryItem)
+ mSettings->setName(mInventoryItem->getName());
+
updateEditEnvironment();
syncronizeTabs();
refresh();
@@ -360,12 +373,19 @@ void LLFloaterFixedEnvironment::doApplyCreateNewInventory()
void LLFloaterFixedEnvironment::doApplyUpdateInventory()
{
+ LL_WARNS("LAPRAS") << "Update inventory for " << mInventoryId << LL_ENDL;
if (mInventoryId.isNull())
- LLSettingsVOBase::createInventoryItem(mSettings, gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS),
- [this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
+ {
+ LL_WARNS("LAPRAS") << "Inventory ID is NULL. Creating New!!!" << LL_ENDL;
+ LLSettingsVOBase::createInventoryItem(mSettings, gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS),
+ [this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
+ }
else
- LLSettingsVOBase::updateInventoryItem(mSettings, mInventoryId,
- [this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryUpdated(asset_id, inventory_id, results); });
+ {
+ LL_WARNS("LAPRAS") << "Updating inventory ID " << mInventoryId << LL_ENDL;
+ LLSettingsVOBase::updateInventoryItem(mSettings, mInventoryId,
+ [this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryUpdated(asset_id, inventory_id, results); });
+ }
}
void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
@@ -431,6 +451,18 @@ void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inven
return;
}
+ if (mInventoryItem)
+ {
+ LLPermissions perms = mInventoryItem->getPermissions();
+
+ LLInventoryItem *created_item = gInventory.getItem(mInventoryId);
+
+ if (created_item)
+ {
+ created_item->setPermissions(perms);
+ created_item->updateServer(false);
+ }
+ }
clearDirtyFlag();
setFocus(TRUE); // Call back the focus...
loadInventoryItem(inventory_id);
@@ -564,10 +596,13 @@ void LLFloaterFixedEnvironmentWater::doImportFromDisk()
return;
}
+ loadInventoryItem(LLUUID::null);
+
setDirtyFlag();
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, legacywater);
setEditSettings(legacywater);
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_FAST, true);
+
}
}
@@ -642,6 +677,8 @@ void LLFloaterFixedEnvironmentSky::doImportFromDisk()
return;
}
+ loadInventoryItem(LLUUID::null);
+
clearDirtyFlag();
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, legacysky);
setEditSettings(legacysky);
@@ -651,3 +688,8 @@ void LLFloaterFixedEnvironmentSky::doImportFromDisk()
//=========================================================================
+void LLSettingsEditPanel::setCanChangeSettings(bool enabled)
+{
+ setEnabled(enabled);
+ setAllChildrenEnabled(enabled);
+}
diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h
index 50b229e0c4..b7991ceb01 100644
--- a/indra/newview/llfloaterfixedenvironment.h
+++ b/indra/newview/llfloaterfixedenvironment.h
@@ -97,6 +97,8 @@ protected:
LLUUID mInventoryId;
LLInventoryItem * mInventoryItem;
LLHandle<LLFloater> mInventoryFloater;
+ bool mCanCopy;
+ bool mCanMod;
void onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results);
void onInventoryUpdated(LLUUID asset_id, LLUUID inventory_id, LLSD results);
@@ -173,8 +175,11 @@ public:
inline void setIsDirty() { mIsDirty = true; if (!mOnDirtyChanged.empty()) mOnDirtyChanged(this, mIsDirty); }
inline void clearIsDirty() { mIsDirty = false; if (!mOnDirtyChanged.empty()) mOnDirtyChanged(this, mIsDirty); }
+ virtual void setCanChangeSettings(bool flag);
+
inline connection_t setOnDirtyFlagChanged(on_dirty_charged_sg::slot_type cb) { return mOnDirtyChanged.connect(cb); }
+
protected:
LLSettingsEditPanel() :
LLPanel(),
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 6426e95f6c..b16ba65c01 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -60,6 +60,8 @@
#include "lldrawpoolwater.h"
#include <boost/algorithm/string/replace.hpp>
+#include "llinventoryobserver.h"
+#include "llinventorydefines.h"
#undef VERIFY_LEGACY_CONVERSION
@@ -177,6 +179,34 @@ void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings
return;
}
+ LLViewerInventoryItem *inv_item = gInventory.getItem(inv_item_id);
+ if (inv_item)
+ {
+ bool need_update(false);
+ LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item);
+
+ if (settings->getFlag(LLSettingsBase::FLAG_NOTRANS) && new_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ {
+ LLPermissions perm(inv_item->getPermissions());
+ perm.setBaseBits(LLUUID::null, FALSE, PERM_TRANSFER);
+ perm.setOwnerBits(LLUUID::null, FALSE, PERM_TRANSFER);
+ new_item->setPermissions(perm);
+ need_update |= true;
+ }
+ if (settings->getName() != new_item->getName())
+ {
+ new_item->rename(settings->getName());
+ settings->setName(new_item->getName()); // account for corrections
+ need_update |= true;
+ }
+ if (need_update)
+ {
+ new_item->updateServer(FALSE);
+ gInventory.updateItem(new_item);
+ gInventory.notifyObservers();
+ }
+ }
+
std::stringstream buffer;
LLSD settingdata(settings->getSettings());
LLSDSerialize::serialize(settingdata, buffer, LLSDSerialize::LLSD_NOTATION);
@@ -210,7 +240,6 @@ void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings
std::stringstream buffer;
LLSD settingdata(settings->getSettings());
-
LLSDSerialize::serialize(settingdata, buffer, LLSDSerialize::LLSD_NOTATION);
LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLBufferedAssetUploadInfo>(object_id, inv_item_id, LLAssetType::AT_SETTINGS, buffer.str(),
@@ -293,6 +322,10 @@ void LLSettingsVOBase::onAssetDownloadComplete(LLVFS *vfs, const LLUUID &asset_i
callback(asset_id, settings, status, ext_status);
}
+void LLSettingsVOBase::getSettingsInventory(const LLUUID &inventoryId, inventory_download_fn callback)
+{
+
+}
bool LLSettingsVOBase::exportFile(const LLSettingsBase::ptr_t &settings, const std::string &filename, LLSDSerialize::ELLSD_Serialize format)
{
@@ -1105,6 +1138,10 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildClone() const
LLSettingsDay::ptr_t dayp = std::make_shared<LLSettingsVODay>(settings);
+ U32 flags = getFlags();
+ if (flags)
+ dayp->setFlags(flags);
+
dayp->initialize();
return dayp;
}
diff --git a/indra/newview/llsettingsvo.h b/indra/newview/llsettingsvo.h
index d314eed24e..0d7b7902c1 100644
--- a/indra/newview/llsettingsvo.h
+++ b/indra/newview/llsettingsvo.h
@@ -39,12 +39,14 @@
#include <boost/signals2.hpp>
class LLVFS;
+class LLInventoryItem;
//=========================================================================
class LLSettingsVOBase : public LLSettingsBase
{
public:
typedef std::function<void(LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status, LLExtStat extstat)> asset_download_fn;
+ typedef std::function<void(LLInventoryItem *inv_item, LLSettingsBase::ptr_t settings, S32 status, LLExtStat extstat)> inventory_download_fn;
typedef std::function<void(LLUUID asset_id, LLUUID inventory_id, LLUUID object_id, LLSD results)> inventory_result_fn;
static void createNewInventoryItem(LLSettingsType::type_e stype, const LLUUID &parent_id, inventory_result_fn callback = inventory_result_fn());
@@ -54,6 +56,7 @@ public:
static void updateInventoryItem(const LLSettingsBase::ptr_t &settings, LLUUID object_id, LLUUID inv_item_id, inventory_result_fn callback = inventory_result_fn());
static void getSettingsAsset(const LLUUID &assetId, asset_download_fn callback);
+ static void getSettingsInventory(const LLUUID &inventoryId, inventory_download_fn callback = inventory_download_fn());
static bool exportFile(const LLSettingsBase::ptr_t &settings, const std::string &filename, LLSDSerialize::ELLSD_Serialize format = LLSDSerialize::LLSD_NOTATION);
static LLSettingsBase::ptr_t importFile(const std::string &filename);
diff --git a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
index 73f2683e84..9b572ce9b0 100644
--- a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
+++ b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
@@ -15,6 +15,8 @@
help_topic="fixed_environment"
single_instance="true"
width="750">
+ <string name="edit_sky">Edit Sky:</string>
+ <string name="edit_water">Edit Water:</string>
<layout_stack name="floater_stack"
left="5"
top="5"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 2ab22cb565..cd642f9531 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -11197,5 +11197,22 @@ Are you sure you want to continue?
notext="No"
yestext="Yes"/>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SettingsMakeNoTrans"
+ type="alertmodal">
+You are about to import non-transferable settings into this daycycle. Continuing will cause the settings you are editing to become non-transferable also.
+
+This change can not be undone.
+
+Are you sure you want to continue?
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Are you sure you want to make settings non-transferable?"
+ name="okcancelignore"
+ notext="No"
+ yestext="Yes"/>
+ </notification>
</notifications>