aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:27 -0500
committerJacek Antonelli2008-08-15 23:45:27 -0500
commita8a62201ba762e98dff92cf49033e577fc34d8d4 (patch)
tree11f8513c5cdc222f2fac0c93eb724c089803c200 /linden/indra/newview/llinventorybridge.cpp
parentSecond Life viewer sources 1.18.6.4-RC (diff)
downloadmeta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.zip
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.gz
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.bz2
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.xz
Second Life viewer sources 1.19.0.0
Diffstat (limited to 'linden/indra/newview/llinventorybridge.cpp')
-rw-r--r--linden/indra/newview/llinventorybridge.cpp67
1 files changed, 55 insertions, 12 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index b017d57..58b8af2 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -12,12 +12,12 @@
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 21 *
22 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -211,6 +211,45 @@ void LLInvFVBridge::showProperties()
211 211
212void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch) 212void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch)
213{ 213{
214 // Deactivate gestures when moving them into Trash
215 LLInvFVBridge* bridge;
216 LLInventoryModel* model = mInventoryPanel->getModel();
217 LLViewerInventoryItem* item = NULL;
218 LLViewerInventoryCategory* cat = NULL;
219 LLInventoryModel::cat_array_t descendent_categories;
220 LLInventoryModel::item_array_t descendent_items;
221 S32 count = batch.count();
222 S32 i,j;
223 for(i = 0; i < count; ++i)
224 {
225 bridge = (LLInvFVBridge*)(batch.get(i));
226 if(!bridge || !bridge->isItemRemovable()) continue;
227 item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID());
228 if (item)
229 {
230 if(LLAssetType::AT_GESTURE == item->getType())
231 {
232 gGestureManager.deactivateGesture(item->getUUID());
233 }
234 }
235 }
236 for(i = 0; i < count; ++i)
237 {
238 bridge = (LLInvFVBridge*)(batch.get(i));
239 if(!bridge || !bridge->isItemRemovable()) continue;
240 cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
241 if (cat)
242 {
243 gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE );
244 for (j=0; j<descendent_items.count(); j++)
245 {
246 if(LLAssetType::AT_GESTURE == descendent_items[j]->getType())
247 {
248 gGestureManager.deactivateGesture(descendent_items[j]->getUUID());
249 }
250 }
251 }
252 }
214 removeBatchNoCheck(batch); 253 removeBatchNoCheck(batch);
215} 254}
216 255
@@ -2719,6 +2758,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
2719 && (LLUUID::null != item->getCreatorUUID()) 2758 && (LLUUID::null != item->getCreatorUUID())
2720 && (item->getCreatorUUID() != gAgent.getID())); 2759 && (item->getCreatorUUID() != gAgent.getID()));
2721 BOOL user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); 2760 BOOL user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()));
2761 items.push_back("Send Instant Message Separator");
2722 items.push_back("Send Instant Message"); 2762 items.push_back("Send Instant Message");
2723 items.push_back("Offer Teleport..."); 2763 items.push_back("Offer Teleport...");
2724 items.push_back("Conference Chat"); 2764 items.push_back("Conference Chat");
@@ -3164,7 +3204,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
3164 std::string(), 3204 std::string(),
3165 cb); 3205 cb);
3166 } 3206 }
3167 gFocusMgr.setKeyboardFocus(NULL, NULL); 3207 gFocusMgr.setKeyboardFocus(NULL);
3168 } 3208 }
3169 else if ("detach" == action) 3209 else if ("detach" == action)
3170 { 3210 {
@@ -4294,21 +4334,24 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
4294 getClipboardEntries(true, items, disabled_items, flags); 4334 getClipboardEntries(true, items, disabled_items, flags);
4295 4335
4296 items.push_back("Wearable Separator"); 4336 items.push_back("Wearable Separator");
4337
4297 items.push_back("Wearable Wear"); 4338 items.push_back("Wearable Wear");
4298 items.push_back("Wearable Edit"); 4339 items.push_back("Wearable Edit");
4340
4341
4299 if ((flags & FIRST_SELECTED_ITEM) == 0) 4342 if ((flags & FIRST_SELECTED_ITEM) == 0)
4300 { 4343 {
4301 disabled_items.push_back("Wearable Edit"); 4344 disabled_items.push_back("Wearable Edit");
4302 } 4345 }
4303 /*menu.appendSeparator(); 4346 //menu.appendSeparator();
4304 menu.append(new LLMenuItemCallGL("Wear", 4347 //menu.append(new LLMenuItemCallGL("Wear",
4305 LLWearableBridge::onWearOnAvatar, 4348 // LLWearableBridge::onWearOnAvatar,
4306 LLWearableBridge::canWearOnAvatar, 4349 // LLWearableBridge::canWearOnAvatar,
4307 (void*)this)); 4350 // (void*)this));
4308 menu.append(new LLMenuItemCallGL("Edit", 4351 //menu.append(new LLMenuItemCallGL("Edit",
4309 LLWearableBridge::onEditOnAvatar, 4352 // LLWearableBridge::onEditOnAvatar,
4310 LLWearableBridge::canEditOnAvatar, 4353 // LLWearableBridge::canEditOnAvatar,
4311 (void*)this));*/ 4354 // (void*)this));
4312 4355
4313 if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) 4356 if( item && (item->getType() == LLAssetType::AT_CLOTHING) )
4314 { 4357 {