aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llinventorybridge.cpp82
1 files changed, 17 insertions, 65 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index baf6638..05334d7 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -122,6 +123,7 @@ const char* ICON_NAME[ICON_NAME_COUNT] =
122 "inv_item_script.tga", 123 "inv_item_script.tga",
123 "inv_item_clothing.tga", 124 "inv_item_clothing.tga",
124 "inv_item_object.tga", 125 "inv_item_object.tga",
126 "inv_item_object_multi.tga",
125 "inv_item_notecard.tga", 127 "inv_item_notecard.tga",
126 "inv_item_bodypart.tga", 128 "inv_item_bodypart.tga",
127 "inv_item_snapshot.tga", 129 "inv_item_snapshot.tga",
@@ -837,7 +839,7 @@ LLString LLItemBridge::getLabelSuffix() const
837 if(xfer) sxfer = EMPTY; 839 if(xfer) sxfer = EMPTY;
838 else sxfer = NO_XFER; 840 else sxfer = NO_XFER;
839 char buffer[MAX_STRING]; /*Flawfinder: ignore*/ 841 char buffer[MAX_STRING]; /*Flawfinder: ignore*/
840 snprintf( /*Flawfinder: ignore*/ 842 snprintf( /* Flawfinder: ignore */
841 buffer, 843 buffer,
842 MAX_STRING, 844 MAX_STRING,
843 "%s%s%s", 845 "%s%s%s",
@@ -1742,7 +1744,7 @@ void LLFolderBridge::folderOptionsMenu()
1742 if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) 1744 if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard))
1743 { 1745 {
1744 mItems.push_back("Calling Card Separator"); 1746 mItems.push_back("Calling Card Separator");
1745 mItems.push_back("IM Contacts In Folder"); 1747 mItems.push_back("Conference Chat Folder");
1746 mItems.push_back("IM All Contacts In Folder"); 1748 mItems.push_back("IM All Contacts In Folder");
1747 } 1749 }
1748 1750
@@ -2061,58 +2063,6 @@ void LLFolderBridge::createWearable(LLUUID parent_id, EWearableType type)
2061 LLPointer<LLInventoryCallback>(NULL)); 2063 LLPointer<LLInventoryCallback>(NULL));
2062} 2064}
2063 2065
2064void LLFolderBridge::beginIMSession(BOOL only_online)
2065{
2066 LLInventoryModel* model = mInventoryPanel->getModel();
2067 if(!model) return;
2068 LLViewerInventoryCategory* cat = getCategory();
2069 if(!cat) return;
2070 LLUniqueBuddyCollector is_buddy;
2071 LLInventoryModel::cat_array_t cat_array;
2072 LLInventoryModel::item_array_t item_array;
2073 model->collectDescendentsIf(mUUID,
2074 cat_array,
2075 item_array,
2076 LLInventoryModel::EXCLUDE_TRASH,
2077 is_buddy);
2078 S32 count = item_array.count();
2079 if(count > 0)
2080 {
2081 // create the session
2082 gIMView->setFloaterOpen(TRUE);
2083 LLDynamicArray<LLUUID> members;
2084 //members.put(gAgent.getID());
2085 S32 i;
2086 EInstantMessage type = IM_SESSION_ADD;
2087 if(only_online)
2088 {
2089 LLAvatarTracker& at = LLAvatarTracker::instance();
2090 LLUUID id;
2091 for(i = 0; i < count; ++i)
2092 {
2093 id = item_array.get(i)->getCreatorUUID();
2094 if(at.isBuddyOnline(id))
2095 {
2096 members.put(id);
2097 }
2098 }
2099 }
2100 else
2101 {
2102 type = IM_SESSION_OFFLINE_ADD;
2103 for(i = 0; i < count; ++i)
2104 {
2105 members.put(item_array.get(i)->getCreatorUUID());
2106 }
2107 }
2108 // the session_id is always the item_id of the inventory folder
2109 gIMView->addSession(cat->getName(),
2110 type,
2111 mUUID,
2112 members);
2113 }
2114}
2115
2116void LLFolderBridge::modifyOutfit(BOOL append) 2066void LLFolderBridge::modifyOutfit(BOOL append)
2117{ 2067{
2118 LLInventoryModel* model = mInventoryPanel->getModel(); 2068 LLInventoryModel* model = mInventoryPanel->getModel();
@@ -2332,7 +2282,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
2332 2282
2333LLViewerImage* LLScriptBridge::getIcon() const 2283LLViewerImage* LLScriptBridge::getIcon() const
2334{ 2284{
2335 return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0); 2285 return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE);
2336} 2286}
2337 2287
2338// +=================================================+ 2288// +=================================================+
@@ -2344,7 +2294,7 @@ LLString LLTextureBridge::sPrefix("Texture: ");
2344 2294
2345LLViewerImage* LLTextureBridge::getIcon() const 2295LLViewerImage* LLTextureBridge::getIcon() const
2346{ 2296{
2347 return get_item_icon(LLAssetType::AT_TEXTURE, mInvType, 0); 2297 return get_item_icon(LLAssetType::AT_TEXTURE, mInvType, 0, FALSE);
2348} 2298}
2349 2299
2350void open_texture(const LLUUID& item_id, 2300void open_texture(const LLUUID& item_id,
@@ -2394,7 +2344,7 @@ LLString LLSoundBridge::sPrefix("Sound: ");
2394 2344
2395LLViewerImage* LLSoundBridge::getIcon() const 2345LLViewerImage* LLSoundBridge::getIcon() const
2396{ 2346{
2397 return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0); 2347 return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE);
2398} 2348}
2399 2349
2400void LLSoundBridge::openItem() 2350void LLSoundBridge::openItem()
@@ -2489,7 +2439,7 @@ LLString LLLandmarkBridge::sPrefix("Landmark: ");
2489 2439
2490LLViewerImage* LLLandmarkBridge::getIcon() const 2440LLViewerImage* LLLandmarkBridge::getIcon() const
2491{ 2441{
2492 return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited); 2442 return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE);
2493} 2443}
2494 2444
2495void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 2445void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -2650,7 +2600,7 @@ LLViewerImage* LLCallingCardBridge::getIcon() const
2650 { 2600 {
2651 online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); 2601 online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
2652 } 2602 }
2653 return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online); 2603 return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE);
2654} 2604}
2655 2605
2656LLString LLCallingCardBridge::getLabelSuffix() const 2606LLString LLCallingCardBridge::getLabelSuffix() const
@@ -2707,11 +2657,13 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
2707 2657
2708 items.push_back("Send Instant Message"); 2658 items.push_back("Send Instant Message");
2709 items.push_back("Offer Teleport..."); 2659 items.push_back("Offer Teleport...");
2660 items.push_back("Conference Chat");
2710 2661
2711 if (!good_card) 2662 if (!good_card)
2712 { 2663 {
2713 disabled_items.push_back("Send Instant Message"); 2664 disabled_items.push_back("Send Instant Message");
2714 disabled_items.push_back("Offer Teleport..."); 2665 disabled_items.push_back("Offer Teleport...");
2666 disabled_items.push_back("Conference Chat");
2715 } 2667 }
2716 } 2668 }
2717 hideContextEntries(menu, items, disabled_items); 2669 hideContextEntries(menu, items, disabled_items);
@@ -2798,7 +2750,7 @@ LLString LLNotecardBridge::sPrefix("Note: ");
2798 2750
2799LLViewerImage* LLNotecardBridge::getIcon() const 2751LLViewerImage* LLNotecardBridge::getIcon() const
2800{ 2752{
2801 return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0); 2753 return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE);
2802} 2754}
2803 2755
2804void open_notecard(const LLUUID& item_id, 2756void open_notecard(const LLUUID& item_id,
@@ -2870,7 +2822,7 @@ LLString LLGestureBridge::sPrefix("Gesture: ");
2870 2822
2871LLViewerImage* LLGestureBridge::getIcon() const 2823LLViewerImage* LLGestureBridge::getIcon() const
2872{ 2824{
2873 return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0); 2825 return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE);
2874} 2826}
2875 2827
2876LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const 2828LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const
@@ -3003,7 +2955,7 @@ LLString LLAnimationBridge::sPrefix("Animation: ");
3003 2955
3004LLViewerImage* LLAnimationBridge::getIcon() const 2956LLViewerImage* LLAnimationBridge::getIcon() const
3005{ 2957{
3006 return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0); 2958 return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE);
3007} 2959}
3008 2960
3009void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 2961void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -3121,7 +3073,7 @@ BOOL LLObjectBridge::isItemRemovable()
3121 3073
3122LLViewerImage* LLObjectBridge::getIcon() const 3074LLViewerImage* LLObjectBridge::getIcon() const
3123{ 3075{
3124 return get_item_icon(LLAssetType::AT_OBJECT, mInvType, mAttachPt); 3076 return get_item_icon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject );
3125} 3077}
3126 3078
3127void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment); 3079void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment);
@@ -3376,7 +3328,7 @@ LLString LLLSLTextBridge::sPrefix("Script: ");
3376 3328
3377LLViewerImage* LLLSLTextBridge::getIcon() const 3329LLViewerImage* LLLSLTextBridge::getIcon() const
3378{ 3330{
3379 return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0); 3331 return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE);
3380} 3332}
3381 3333
3382void LLLSLTextBridge::openItem() 3334void LLLSLTextBridge::openItem()
@@ -4139,7 +4091,7 @@ LLString LLWearableBridge::getLabelSuffix() const
4139 4091
4140LLViewerImage* LLWearableBridge::getIcon() const 4092LLViewerImage* LLWearableBridge::getIcon() const
4141{ 4093{
4142 return get_item_icon(mAssetType, mInvType, mWearableType); 4094 return get_item_icon(mAssetType, mInvType, mWearableType, FALSE);
4143} 4095}
4144 4096
4145// virtual 4097// virtual