summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
commit7e9ba401d1489ef96c5315f03332f28d62d97899 (patch)
treec2eabeb3f4f635ae49e5a3e9b07da54dad30eee2 /indra/newview/llavataractions.cpp
parent2abb1a81c56a27eab02157851cb9e67730231bb6 (diff)
parent4c5141c5677a2e98c1331026d4e119abee6ab2ae (diff)
reconciled .hgtags
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rwxr-xr-xindra/newview/llavataractions.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 8ca621538f..7abecc643b 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -680,12 +680,29 @@ namespace action_give_inventory
std::string items;
build_items_string(inventory_selected_uuids, items);
+ int folders_count = 0;
+ std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin();
+
+ //traverse through selected inventory items and count folders among them
+ for ( ; it != inventory_selected_uuids.end() && folders_count <=1 ; ++it)
+ {
+ LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it);
+ if (NULL != inv_cat)
+ {
+ folders_count++;
+ }
+ }
+
+ // EXP-1599
+ // In case of sharing multiple folders, make the confirmation
+ // dialog contain a warning that only one folder can be shared at a time.
+ std::string notification = (folders_count > 1) ? "ShareFolderConfirmation" : "ShareItemsConfirmation";
LLSD substitutions;
substitutions["RESIDENTS"] = residents;
substitutions["ITEMS"] = items;
LLShareInfo::instance().mAvatarNames = avatar_names;
LLShareInfo::instance().mAvatarUuids = avatar_uuids;
- LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, LLSD(), &give_inventory_cb);
+ LLNotificationsUtil::add(notification, substitutions, LLSD(), &give_inventory_cb);
}
}