diff options
author | Oz Linden <oz@lindenlab.com> | 2012-01-08 10:48:26 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-01-08 10:48:26 -0500 |
commit | 3763386987bd7ab42438a1f1bdf3a78283bcbf51 (patch) | |
tree | b45814d100958d0adb07100440888c56200a5a9a /indra/newview/llavataractions.cpp | |
parent | 66555b844dfcdb1bbbab472967a90060c5d0838f (diff) | |
parent | 757a955bd700eb4f838762dcbe789a77ee052064 (diff) |
merge changes for vmrg-213
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rwxr-xr-x | indra/newview/llavataractions.cpp | 19 |
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); } } |