summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-05-14 15:57:17 -0700
committerMerov Linden <merov@lindenlab.com>2014-05-14 15:57:17 -0700
commit10591cce8e36e4c27c4a68c68c0502eaa24d8964 (patch)
tree9786ef50e4138e809d6c2e16a7cd3f7dff9f5568 /indra/newview
parent95a9c12564242fc05ac96711dc7b4d46f6ba38b9 (diff)
DD-76, DD-77, DD-90 : recycled can_move_to_outbox() into can_move_to_marketplace() so we have now the same logic for both marketplace and merchant outbox
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llinventorybridge.cpp22
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml6
2 files changed, 20 insertions, 8 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index f04724ace1..c9efb92acc 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2344,7 +2344,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
}
-static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_msg)
+static BOOL can_move_to_marketplace(LLInventoryItem* inv_item, std::string& tooltip_msg)
{
// Collapse links directly to items/folders
LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item;
@@ -2622,7 +2622,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
for (S32 i=0; i < descendent_items.count(); ++i)
{
LLInventoryItem* item = descendent_items[i];
- if (!can_move_to_outbox(item, tooltip_msg))
+ if (!can_move_to_marketplace(item, tooltip_msg))
{
is_movable = FALSE;
break;
@@ -2636,6 +2636,18 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// One cannot move a folder into a stock folder
is_movable = (getPreferredType() != LLFolderType::FT_MARKETPLACE_STOCK);
// *TODO : Merov : Add case if (nesting depth source + depth destination) > marketplace limit -> FALSE
+ if (is_movable)
+ {
+ for (S32 i = 0; i < descendent_items.count(); ++i)
+ {
+ LLInventoryItem* item = descendent_items[i];
+ if (!can_move_to_marketplace(item, tooltip_msg))
+ {
+ is_movable = FALSE;
+ break;
+ }
+ }
+ }
}
if (is_movable)
@@ -4398,7 +4410,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
else if (move_is_into_outbox)
{
- accept = can_move_to_outbox(inv_item, tooltip_msg);
+ accept = can_move_to_marketplace(inv_item, tooltip_msg);
if (accept)
{
@@ -4427,8 +4439,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
// Check stock folder type matches item type
accept = (getCategory() && getCategory()->acceptItem(inv_item));
- // Do not accept calling cards in marketplace listings
- accept &= (LLAssetType::AT_CALLINGCARD != inv_item->getType());
+ // Check that the object can move into marketplace listings
+ accept &= can_move_to_marketplace(inv_item, tooltip_msg);
}
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index ab7df75216..ad1af2faa3 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -211,10 +211,10 @@ Please try logging in again in a minute.</string>
<string name="TooltipPrice" value="L$[AMOUNT]: "/>
<string name="TooltipOutboxDragToWorld">You can not rez items in your merchant outbox</string>
- <string name="TooltipOutboxNoTransfer">One or more of these objects cannot be sold or transferred.</string>
+ <string name="TooltipOutboxNoTransfer">One or more of these objects cannot be sold or transferred</string>
<string name="TooltipOutboxNotInInventory">Your merchant outbox can only accept items directly from your inventory</string>
- <string name="TooltipOutboxWorn">You can not put items you are wearing into your merchant outbox</string>
- <string name="TooltipOutboxCallingCard">You can not put calling cards into your merchant outbox</string>
+ <string name="TooltipOutboxWorn">You can not put items you are wearing on the marketplace</string>
+ <string name="TooltipOutboxCallingCard">You can not put calling cards on the marketplace</string>
<string name="TooltipOutboxFolderLevels">Depth of nested folders exceeds 3</string>
<string name="TooltipOutboxTooManyFolders">Subfolder count in top-level folder exceeds 20</string>
<string name="TooltipOutboxTooManyObjects">Item count in top-level folder exceeds 200</string>