summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp14
-rw-r--r--indra/newview/llviewertexteditor.cpp86
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml11
3 files changed, 71 insertions, 40 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 468c3599ff..c6e2418b46 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -254,6 +254,11 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
getChild<LLButton>(track_tabs[idx + 1], true)->setTextArg("[DSC]", label.str());
}
+ bool extended_env = LLEnvironment::instance().isExtendedEnvironmentEnabled();
+ for (int i = 2; i < LLSettingsDay::TRACK_MAX; i++) //skies #2 through #4
+ {
+ getChild<LLButton>(track_tabs[i])->setEnabled(extended_env);
+ }
}
void LLFloaterEditExtDayCycle::onClose(bool app_quitting)
@@ -887,7 +892,14 @@ void LLFloaterEditExtDayCycle::updateEditEnvironment(void)
mSkyBlender = std::make_shared<LLTrackBlenderLoopingManual>(mScratchSky, mEditDay, skytrack);
mWaterBlender = std::make_shared<LLTrackBlenderLoopingManual>(mScratchWater, mEditDay, LLSettingsDay::TRACK_WATER);
- selectTrack(LLSettingsDay::TRACK_MAX, true);
+ if (LLEnvironment::instance().isExtendedEnvironmentEnabled())
+ {
+ selectTrack(LLSettingsDay::TRACK_MAX, true);
+ }
+ else
+ {
+ selectTrack(1, true);
+ }
reblendSettings();
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index f828dc04d2..714170a513 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -31,6 +31,7 @@
#include "llagent.h"
#include "llaudioengine.h"
#include "llavataractions.h"
+#include "llenvironment.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
@@ -854,8 +855,18 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
if (getEnabled() && acceptsTextInput())
{
+ bool supported = false;
switch( cargo_type )
{
+ case DAD_SETTINGS:
+ {
+ supported = LLEnvironment::instance().isExtendedEnvironmentEnabled();
+ if (!supported && tooltip_msg.empty())
+ {
+ tooltip_msg.assign(LLTrans::getString("TooltipNotecardNotAllowedTypeDrop"));
+ }
+ break;
+ }
case DAD_CALLINGCARD:
case DAD_TEXTURE:
case DAD_SOUND:
@@ -868,54 +879,51 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
case DAD_ANIMATION:
case DAD_GESTURE:
case DAD_MESH:
- case DAD_SETTINGS:
{
- LLInventoryItem *item = (LLInventoryItem *)cargo_data;
- if( item && allowsEmbeddedItems() )
+ supported = true;
+ break;
+ }
+
+ default:
+ supported = false;
+ break;
+ }
+
+ LLInventoryItem *item = (LLInventoryItem *)cargo_data;
+ if (item && allowsEmbeddedItems() && supported)
+ {
+ U32 mask_next = item->getPermissions().getMaskNextOwner();
+ if((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
+ {
+ if( drop )
{
- U32 mask_next = item->getPermissions().getMaskNextOwner();
- if((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
- {
- if( drop )
- {
- deselect();
- S32 old_cursor = mCursorPos;
- setCursorAtLocalPos( x, y, TRUE );
- S32 insert_pos = mCursorPos;
- setCursorPos(old_cursor);
- BOOL inserted = insertEmbeddedItem( insert_pos, item );
- if( inserted && (old_cursor > mCursorPos) )
- {
- setCursorPos(mCursorPos + 1);
- }
-
- needsReflow();
-
- }
- *accept = ACCEPT_YES_COPY_MULTI;
- }
- else
+ deselect();
+ S32 old_cursor = mCursorPos;
+ setCursorAtLocalPos( x, y, TRUE );
+ S32 insert_pos = mCursorPos;
+ setCursorPos(old_cursor);
+ BOOL inserted = insertEmbeddedItem( insert_pos, item );
+ if( inserted && (old_cursor > mCursorPos) )
{
- *accept = ACCEPT_NO;
- if (tooltip_msg.empty())
- {
- // *TODO: Translate
- tooltip_msg.assign("Only items with unrestricted\n"
- "'next owner' permissions \n"
- "can be attached to notecards.");
- }
+ setCursorPos(mCursorPos + 1);
}
+
+ needsReflow();
}
- else
+ *accept = ACCEPT_YES_COPY_MULTI;
+ }
+ else
+ {
+ *accept = ACCEPT_NO;
+ if (tooltip_msg.empty())
{
- *accept = ACCEPT_NO;
+ tooltip_msg.assign(LLTrans::getString("TooltipNotecardOwnerRestrictedDrop"));
}
- break;
}
-
- default:
+ }
+ else
+ {
*accept = ACCEPT_NO;
- break;
}
}
else
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 74171a86cc..c0481d1a28 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -315,6 +315,17 @@ Please try logging in again in a minute.</string>
<string name="BUTTON_DOCK">Dock</string>
<string name="BUTTON_HELP">Show Help</string>
+ <!-- ToolTips for notecards -->
+ <string name="TooltipNotecardNotAllowedTypeDrop">
+Items of this type can't be attached
+to notecards on this region.
+ </string>
+ <string name="TooltipNotecardOwnerRestrictedDrop">
+Only items with unrestricted
+'next owner' permissions
+"can be attached to notecards.
+ </string>
+
<!-- searching - generic -->
<string name="Searching">Searching...</string>
<string name="NoneFound">None found.</string>