diff options
-rw-r--r-- | indra/cmake/GooglePerfTools.cmake | 7 | ||||
-rw-r--r-- | indra/llcommon/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/llagent.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llagentwearables.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 51 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.h | 19 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 109 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.h | 2 | ||||
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llinventorymodel.h | 5 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatar.h | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 43 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.h | 1 | ||||
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llwearable.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_outgoing_call.xml | 11 |
22 files changed, 182 insertions, 172 deletions
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 355ecb58f0..946fc6b375 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -23,12 +23,11 @@ else (STANDALONE) endif (STANDALONE) if (GOOGLE_PERFTOOLS_FOUND) - set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.") + # XXX Disable temporarily, until we have compilation issues on 64-bit + # Etch sorted. + set(USE_GOOGLE_PERFTOOLS OFF CACHE BOOL "Build with Google PerfTools support.") endif (GOOGLE_PERFTOOLS_FOUND) -# XXX Disable temporarily, until we have compilation issues on 64-bit -# Etch sorted. -set(USE_GOOGLE_PERFTOOLS OFF) if (WINDOWS) # *TODO -reenable this once we get server usage sorted out #set(USE_GOOGLE_PERFTOOLS ON) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index e41c75846b..416303342a 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -9,6 +9,7 @@ include(Linking) include(Boost) include(Pth) include(LLSharedLibs) +include(GooglePerfTools) include(Copy3rdPartyLibs) include_directories( @@ -259,6 +260,7 @@ target_link_libraries( ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} ${PTH_LIBRARIES} + ${GOOGLE_PERFTOOLS_LIBRARIES} ) add_dependencies(llcommon stage_third_party_libs) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7a540a45c4..fb2ecb3bed 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -6326,7 +6326,7 @@ void LLAgent::sendAgentSetAppearance() msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); } msg->nextBlockFast(_PREHASH_ObjectData); - mAvatarObject->packTEMessage( gMessageSystem ); + mAvatarObject->sendAppearanceMessage( gMessageSystem ); } else { diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6b2033fc6f..538dcb6f3d 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -653,11 +653,13 @@ LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearable *wearable) { - if (!getWearable(type,index)) + LLWearable *old_wearable = getWearable(type,index); + if (!old_wearable) { pushWearable(type,wearable); return; } + wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) { @@ -672,6 +674,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab else { wearable_vec[index] = wearable; + old_wearable->setLabelUpdated(); mAvatarObject->wearableUpdated(wearable->getType()); } } @@ -688,6 +691,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl { mWearableDatas[type].push_back(wearable); mAvatarObject->wearableUpdated(wearable->getType()); + wearable->setLabelUpdated(); return mWearableDatas[type].size()-1; } return MAX_WEARABLES_PER_TYPE; @@ -717,6 +721,7 @@ void LLAgentWearables::popWearable(const EWearableType type, U32 index) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); mAvatarObject->wearableUpdated(wearable->getType()); + wearable->setLabelUpdated(); } } @@ -1412,14 +1417,10 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem for (S32 i=max_entry; i>=0; i--) { LLWearable* old_wearable = getWearable(type,i); - const LLUUID &item_id = getWearableItemID(type,i); - popWearable(type,i); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - LLAppearanceManager::instance().removeItemLinks(item_id,false); - //queryWearableCache(); // moved below if (old_wearable) { + popWearable(old_wearable); old_wearable->removeFromAvatar(TRUE); } } @@ -1428,16 +1429,11 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem else { LLWearable* old_wearable = getWearable(type, index); - - const LLUUID &item_id = getWearableItemID(type,index); - popWearable(type, index); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - LLAppearanceManager::instance().removeItemLinks(item_id,false); - //queryWearableCache(); // moved below if (old_wearable) { + popWearable(old_wearable); old_wearable->removeFromAvatar(TRUE); } } @@ -1499,7 +1495,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it continue; } - gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); // Assumes existing wearables are not dirty. if (old_wearable->isDirty()) { @@ -1508,9 +1503,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } } - setWearable(type,0,new_wearable); if (new_wearable) new_wearable->setItemID(new_item->getUUID()); + setWearable(type,0,new_wearable); } std::vector<LLWearable*> wearables_being_removed; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 60c6061e96..d6265a85f6 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -579,7 +579,6 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, if(wearables.count() > 0) { gAgentWearables.setWearableOutfit(items, wearables, !append); - gInventory.notifyObservers(); } delete holder; @@ -819,15 +818,23 @@ bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventor (a->getWearableType() == b->getWearableType())); } -void LLAppearanceManager::addItemLink( LLInventoryItem* item, bool do_update ) +void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update ) { - LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + const LLInventoryItem *item = gInventory.getItem(item_id); + addCOFItemLink(item); +} + +void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_update ) +{ + const LLViewerInventoryItem *vitem = dynamic_cast<const LLViewerInventoryItem*>(item); if (!vitem) { llwarns << "not an llviewerinventoryitem, failed" << llendl; return; } - + + gInventory.addChangedMask(LLInventoryObserver::LABEL, vitem->getLinkedUUID()); + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceManager::getCOF(), @@ -839,7 +846,7 @@ void LLAppearanceManager::addItemLink( LLInventoryItem* item, bool do_update ) { // Are these links to the same object? const LLViewerInventoryItem* inv_item = item_array.get(i).get(); - if (inv_item->getLinkedUUID() == item->getLinkedUUID()) + if (inv_item->getLinkedUUID() == vitem->getLinkedUUID()) { linked_already = true; } @@ -850,7 +857,6 @@ void LLAppearanceManager::addItemLink( LLInventoryItem* item, bool do_update ) { gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); gInventory.purgeObject(inv_item->getUUID()); - gInventory.notifyObservers(); } } if (linked_already) @@ -886,8 +892,10 @@ void LLAppearanceManager::addEnsembleLink( LLInventoryCategory* cat, bool do_upd #endif } -void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update) +void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_update) { + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceManager::getCOF(), @@ -899,7 +907,8 @@ void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update) const LLInventoryItem* item = item_array.get(i).get(); if (item->getLinkedUUID() == item_id) { - gInventory.purgeObject(item_array.get(i)->getUUID()); + const LLUUID& item_id = item_array.get(i)->getUUID(); + gInventory.purgeObject(item_id); } } if (do_update) @@ -978,18 +987,13 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) void LLAppearanceManager::registerAttachment(const LLUUID& item_id) { mRegisteredAttachments.insert(item_id); + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); //dumpAttachmentSet(mRegisteredAttachments,"after register:"); if (mAttachmentInvLinkEnabled) { - LLViewerInventoryItem *item = gInventory.getItem(item_id); - if (item) - { - //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Adding attachment link:"); - LLAppearanceManager::addItemLink(item,false); // Add COF link for item. - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - gInventory.notifyObservers(); - } + //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Adding attachment link:"); + LLAppearanceManager::addCOFItemLink(item_id, false); // Add COF link for item. } else { @@ -1000,15 +1004,14 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id) void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id) { mRegisteredAttachments.erase(item_id); + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + //dumpAttachmentSet(mRegisteredAttachments,"after unregister:"); if (mAttachmentInvLinkEnabled) { //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:"); - LLAppearanceManager::removeItemLinks(item_id, false); - // BAP - needs to change for label to track link. - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - gInventory.notifyObservers(); + LLAppearanceManager::removeCOFItemLinks(item_id, false); } else { @@ -1023,13 +1026,7 @@ void LLAppearanceManager::linkRegisteredAttachments() ++it) { LLUUID item_id = *it; - LLViewerInventoryItem *item = gInventory.getItem(item_id); - if (item) - { - addItemLink(item, false); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - gInventory.notifyObservers(); - } + addCOFItemLink(item_id, false); } mRegisteredAttachments.clear(); } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 12ffa336b4..5daa6d067b 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -54,12 +54,6 @@ public: void wearOutfitByName(const std::string& name); void changeOutfit(bool proceed, const LLUUID& category, bool append); - // Add COF link to individual item. - void addItemLink(LLInventoryItem* item, bool do_update = true); - - // Add COF link to ensemble folder. - void addEnsembleLink(LLInventoryCategory* item, bool do_update = true); - // Copy all items in a category. void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb); @@ -67,9 +61,6 @@ public: // Find the Current Outfit folder. LLUUID getCOF(); - // Remove COF entries - void removeItemLinks(const LLUUID& item_id, bool do_update = true); - void updateAgentWearables(LLWearableHoldingPattern* holder, bool append); // For debugging - could be moved elsewhere. @@ -87,6 +78,16 @@ public: LLInventoryModel::item_array_t& items, LLPointer<LLInventoryCallback> cb); + // Add COF link to individual item. + void addCOFItemLink(const LLUUID& item_id, bool do_update = true); + void addCOFItemLink(const LLInventoryItem *item, bool do_update = true); + + // Remove COF entries + void removeCOFItemLinks(const LLUUID& item_id, bool do_update = true); + + // Add COF link to ensemble folder. + void addEnsembleLink(LLInventoryCategory* item, bool do_update = true); + protected: LLAppearanceManager(); ~LLAppearanceManager(); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f82d178089..3d7b324458 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3534,6 +3534,7 @@ void LLAppViewer::idle() gEventNotifier.update(); gIdleCallbacks.callFunctions(); + gInventory.notifyObservers(); } if (gDisconnected) diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index bf74c5c936..7323c421da 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1253,6 +1253,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) // filter self only on first pass through LLFolderViewItem::filter( filter ); } + if (mDontShowInHierarchy) + { + setOpen(); + } } if (getRoot()->getDebugFilters()) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2d8b058ed8..384d2ae671 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -31,73 +31,37 @@ */
#include "llviewerprecompiledheaders.h"
-
-#include <utility> // for std::pair<>
-
-#include "llfloaterinventory.h"
#include "llinventorybridge.h"
-#include "message.h"
-
#include "llagent.h"
#include "llagentwearables.h"
-#include "llcallingcard.h"
-#include "llcheckboxctrl.h" // for radio buttons
-#include "llfloaterreg.h"
-#include "llradiogroup.h"
-#include "llspinctrl.h"
-#include "lltextbox.h"
-#include "llui.h"
-
-#include "llviewercontrol.h"
-#include "llfirstuse.h"
-#include "llfoldertype.h"
-#include "llfloaterchat.h"
+#include "llappearancemgr.h"
+#include "llavataractions.h"
#include "llfloatercustomize.h"
-#include "llfloaterproperties.h"
+#include "llfloaterinventory.h"
+#include "llfloateropenobject.h"
+#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
-#include "llfocusmgr.h"
-#include "llfolderview.h"
#include "llfriendcard.h"
-#include "llavataractions.h"
#include "llgesturemgr.h"
-#include "lliconctrl.h"
+#include "llimfloater.h"
+#include "llimview.h"
+#include "llinventoryclipboard.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorypanel.h"
-#include "llinventoryclipboard.h"
-#include "lllineeditor.h"
-#include "llmenugl.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
-#include "llpreviewnotecard.h"
-#include "llpreviewscript.h"
-#include "llpreviewsound.h"
#include "llpreviewtexture.h"
-#include "llresmgr.h"
-#include "llscrollcontainer.h"
-#include "llimview.h"
-#include "lltooldraganddrop.h"
-#include "llviewerfoldertype.h"
-#include "llviewertexturelist.h"
-#include "llviewerinventory.h"
-#include "llviewerobjectlist.h"
-#include "llviewerwindow.h"
-#include "llvoavatar.h"
-#include "llwearable.h"
-#include "llwearablelist.h"
-#include "llviewerassettype.h"
-#include "llviewermessage.h"
-#include "llviewerregion.h"
-#include "llvoavatarself.h"
-#include "lltabcontainer.h"
-#include "lluictrlfactory.h"
#include "llselectmgr.h"
#include "llsidetray.h"
-#include "llfloateropenobject.h"
#include "lltrans.h"
-#include "llappearancemgr.h"
-#include "llimfloater.h"
+#include "llviewerassettype.h"
+#include "llviewermessage.h"
+#include "llviewerobjectlist.h"
+#include "llviewerwindow.h"
+#include "llvoavatarself.h"
+#include "llwearablelist.h"
using namespace LLOldEvents;
@@ -219,37 +183,6 @@ BOOL LLInvFVBridge::isItemRemovable() return FALSE;
}
-// Sends an update to all link items that point to the base item.
-void LLInvFVBridge::renameLinkedItems(const LLUUID &item_id, const std::string& new_name)
-{
- LLInventoryModel* model = getInventoryModel();
- if(!model) return;
-
- LLInventoryItem* itemp = model->getItem(mUUID);
- if (!itemp) return;
-
- if (itemp->getIsLinkType())
- {
- return;
- }
-
- LLInventoryModel::item_array_t item_array = model->collectLinkedItems(item_id);
- for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
- iter != item_array.end();
- iter++)
- {
- LLViewerInventoryItem *linked_item = (*iter);
- if (linked_item->getUUID() == item_id) continue;
-
- LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(linked_item);
- new_item->rename(new_name);
- new_item->updateServer(FALSE);
- model->updateItem(new_item);
- // model->addChangedMask(LLInventoryObserver::LABEL, linked_item->getUUID());
- }
- model->notifyObservers();
-}
-
// Can be moved to another folder
BOOL LLInvFVBridge::isItemMovable() const
{
@@ -2898,9 +2831,11 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, }
const LLUUID& favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
-
+ const LLUUID& landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
+ const BOOL folder_allows_reorder = ((mUUID == landmarks_id) || (mUUID == favorites_id));
+
// we can move item inside a folder only if this folder is Favorites. See EXT-719
- accept = is_movable && ((mUUID != inv_item->getParentUUID()) || (mUUID == favorites_id));
+ accept = is_movable && ((mUUID != inv_item->getParentUUID()) || folder_allows_reorder);
if(accept && drop)
{
if (inv_item->getType() == LLAssetType::AT_GESTURE
@@ -2923,12 +2858,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, }
// if dragging from/into favorites folder only reorder items
- if ((mUUID == inv_item->getParentUUID()) && (favorites_id == mUUID))
+ if ((mUUID == inv_item->getParentUUID()) && folder_allows_reorder)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLIsType is_type(LLAssetType::AT_LANDMARK);
- model->collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
+ model->collectDescendentsIf(mUUID, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
@@ -2958,7 +2893,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // BAP - should skip if dup.
if (move_is_into_current_outfit)
{
- LLAppearanceManager::instance().addItemLink(inv_item);
+ LLAppearanceManager::instance().addCOFItemLink(inv_item);
}
else
{
@@ -4205,7 +4140,7 @@ void wear_inventory_item_on_avatar( LLInventoryItem* item ) lldebugs << "wear_inventory_item_on_avatar( " << item->getName()
<< " )" << llendl;
- LLAppearanceManager::instance().addItemLink(item);
+ LLAppearanceManager::instance().addCOFItemLink(item);
}
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 56cb0f93ed..49e64ebdde 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -204,8 +204,6 @@ protected: const LLUUID& new_parent, BOOL restamp); void removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch); - void renameLinkedItems(const LLUUID &item_id, const std::string& new_name); - protected: LLHandle<LLPanel> mInventoryPanel; const LLUUID mUUID; // item id diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 84588fbe8c..fbaab385fe 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -509,7 +509,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, } } -void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) +void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask) { const LLInventoryObject *obj = getObject(object_id); if (!obj || obj->getIsLinkType()) @@ -532,7 +532,7 @@ void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) cat_iter++) { LLViewerInventoryCategory *linked_cat = (*cat_iter); - addChangedMask(LLInventoryObserver::LABEL, linked_cat->getUUID()); + addChangedMask(mask, linked_cat->getUUID()); }; for (LLInventoryModel::item_array_t::iterator iter = item_array.begin(); @@ -540,9 +540,8 @@ void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) iter++) { LLViewerInventoryItem *linked_item = (*iter); - addChangedMask(LLInventoryObserver::LABEL, linked_item->getUUID()); + addChangedMask(mask, linked_item->getUUID()); }; - notifyObservers(); } const LLUUID& LLInventoryModel::getLinkedItemID(const LLUUID& object_id) const @@ -1133,6 +1132,14 @@ void LLInventoryModel::notifyObservers(const std::string service_name) llwarns << "Call was made to notifyObservers within notifyObservers!" << llendl; return; } + + if ((mModifyMask == LLInventoryObserver::NONE) && (service_name == "")) + { + mModifyMask = LLInventoryObserver::NONE; + mChangedItemIDs.clear(); + return; + } + mIsNotifyObservers = TRUE; for (observer_list_t::iterator iter = mObservers.begin(); iter != mObservers.end(); ) @@ -1180,7 +1187,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent) // not sure what else might need to be accounted for this. if (mModifyMask & LLInventoryObserver::LABEL) { - updateLinkedItems(referent); + addChangedMaskForLinks(referent, LLInventoryObserver::LABEL); } } diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index aa4ffb392f..da12dbdf7f 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -167,8 +167,6 @@ public: // Assumes item_id is itself not a linked item. item_array_t collectLinkedItems(const LLUUID& item_id, const LLUUID& start_folder_id = LLUUID::null); - // Updates all linked items pointing to this id. - void updateLinkedItems(const LLUUID& object_id); // Get the inventoryID that this item points to, else just return item_id const LLUUID& getLinkedItemID(const LLUUID& object_id) const; @@ -440,6 +438,9 @@ protected: bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting); + // Updates all linked items pointing to this id. + void addChangedMaskForLinks(const LLUUID& object_id, U32 mask); + protected: cat_array_t* getUnlockedCatArray(const LLUUID& id); item_array_t* getUnlockedItemArray(const LLUUID& id); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 450ce92412..99591dea57 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -345,14 +345,6 @@ void LLInventoryPanel::modelChanged(U32 mask) view_item->destroyView();
}
}
- else
- {
- // Hmm, we got an ADD/REMOVE/STRUCTURE notification for this item but there's nothing to be done to it.
- llwarns << "Notification triggered for item that isn't changing. "
- << "Operation: ( mask: " << mask << " panel name: " << mStartFolderString << " ) "
- << "Item: [ Name:" << model_item->getName() << " UUID: " << *id_it << " ]" << llendl;
-
- }
}
// This item has been removed from memory, but its associated UI element still exists.
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 1d62ead843..089535dfab 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1215,11 +1215,6 @@ void LLViewerInventoryItem::rename(const std::string& n) const LLPermissions& LLViewerInventoryItem::getPermissions() const { - if (const LLViewerInventoryItem *linked_item = getLinkedItem()) - { - return linked_item->getPermissions(); - } - // Use the actual permissions of the symlink, not its parent. return LLInventoryItem::getPermissions(); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b6c1ee2f11..75e35e5221 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6267,7 +6267,7 @@ LLColor4 LLVOAvatar::getDummyColor() return DUMMY_COLOR; } -void LLVOAvatar::dumpAvatarTEs( const std::string& context ) +void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const { /* const char* te_name[] = { "TEX_HEAD_BODYPAINT ", diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 2fd1a506a9..4b3e850e7a 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -889,7 +889,7 @@ public: static void dumpArchetypeXML(void*); static void dumpBakedStatus(); const std::string getBakedStatusForPrintout() const; - void dumpAvatarTEs(const std::string& context); + void dumpAvatarTEs(const std::string& context) const; static F32 sUnbakedTime; // Total seconds with >=1 unbaked avatars static F32 sUnbakedUpdateTime; // Last time stats were updated (to prevent multiple updates per frame) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 711e9f90fc..d9c5e932a2 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2074,6 +2074,49 @@ void LLVOAvatarSelf::setInvisible(BOOL newvalue) } } +// HACK: this will null out the avatar's local texture IDs before the TE message is sent +// to ensure local texture IDs are not sent to other clients in the area. +// this is a short-term solution. The long term solution will be to not set the texture +// IDs in the avatar object, and keep them only in the wearable. +// This will involve further refactoring that is too risky for the initial release of 2.0. +bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const +{ + LLUUID texture_id[TEX_NUM_INDICES]; + // pack away current TEs to make sure we don't send them out + for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); + iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); + ++iter) + { + const ETextureIndex index = iter->first; + const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second; + if (!texture_dict->mIsBakedTexture) + { + LLTextureEntry* entry = getTE((U8) index); + texture_id[index] = entry->getID(); + entry->setID(IMG_DEFAULT_AVATAR); + } + } + + bool success = packTEMessage(mesgsys); + + // unpack TEs to make sure we don't re-trigger a bake + for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); + iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); + ++iter) + { + const ETextureIndex index = iter->first; + const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second; + if (!texture_dict->mIsBakedTexture) + { + LLTextureEntry* entry = getTE((U8) index); + entry->setID(texture_id[index]); + } + } + + return success; +} + + //------------------------------------------------------------------------ // needsRenderBeam() //------------------------------------------------------------------------ diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 6702f030fe..a1cad82eff 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -310,6 +310,7 @@ public: public: static void onChangeSelfInvisible(BOOL newvalue); void setInvisible(BOOL newvalue); + bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; /** Appearance ** ** diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 21054dacd0..8f63df8c29 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -754,6 +754,8 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string void LLVoiceChannelP2P::handleStatusChange(EStatusType type) { + llinfos << "P2P CALL CHANNEL STATUS CHANGE: incoming=" << int(mReceivedCall) << " newstatus=" << LLVoiceClientStatusObserver::status2string(type) << " (mState=" << mState << ")" << llendl; + // status updates switch(type) { @@ -880,6 +882,8 @@ void LLVoiceChannelP2P::setState(EState state) // *HACK: Open/close the call window if needed. toggleCallWindowIfNeeded(state); + llinfos << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl; + if (mReceivedCall) // incoming call { // you only "answer" voice invites in p2p mode @@ -896,7 +900,8 @@ void LLVoiceChannelP2P::setState(EState state) mCallDialogPayload["session_id"] = mSessionID; mCallDialogPayload["session_name"] = mSessionName; mCallDialogPayload["other_user_id"] = mOtherUserID; - if (state == STATE_RINGING) + if (state == STATE_RINGING || + state == STATE_CALL_STARTED) { // *HACK: open outgoing call floater if needed, might be better done elsewhere. // *TODO: should move this squirrelly ui-fudging crap into LLOutgoingCallDialog itself @@ -908,6 +913,7 @@ void LLVoiceChannelP2P::setState(EState state) ocd->getChild<LLTextBox>("calling")->setVisible(true); ocd->getChild<LLTextBox>("leaving")->setVisible(true); ocd->getChild<LLTextBox>("connecting")->setVisible(false); + ocd->getChild<LLTextBox>("noanswer")->setVisible(false); } } } @@ -919,16 +925,29 @@ void LLVoiceChannelP2P::setState(EState state) ocd->getChild<LLTextBox>("calling")->setVisible(false); ocd->getChild<LLTextBox>("leaving")->setVisible(false); ocd->getChild<LLTextBox>("connecting")->setVisible(true); + ocd->getChild<LLTextBox>("noanswer")->setVisible(false); } }*/ + else if (state == STATE_ERROR) + { + LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->getChild<LLTextBox>("calling")->setVisible(false); + ocd->getChild<LLTextBox>("leaving")->setVisible(false); + ocd->getChild<LLTextBox>("connecting")->setVisible(false); + ocd->getChild<LLTextBox>("noanswer")->setVisible(true); + } + } else if (state == STATE_HUNG_UP || state == STATE_CONNECTED) { - LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->closeFloater(); - } + // hide popup + LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->closeFloater(); + } } } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 2849cfa20e..ced0b64896 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -38,6 +38,7 @@ #include "lllocaltextureobject.h" #include "llviewertexturelist.h" #include "llinventorymodel.h" +#include "llinventoryobserver.h" #include "llviewerregion.h" #include "llvoavatar.h" #include "llvoavatarself.h" @@ -1098,6 +1099,12 @@ void LLWearable::destroyTextures() mSavedTEMap.clear(); } + +void LLWearable::setLabelUpdated() const +{ + gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID()); +} + struct LLWearableSaveData { EWearableType mType; diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index fd19a86406..0863adb7f5 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -128,6 +128,8 @@ public: BOOL isOnTop() const; + // Something happened that requires the wearable's label to be updated (e.g. worn/unworn). + void setLabelUpdated() const; private: typedef std::map<S32, LLLocalTextureObject*> te_map_t; diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 82417de8a7..ae4d5042ef 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -59,6 +59,17 @@ Connecting to [CALLEE_NAME] Calling [CALLEE_NAME] </text> <text + font="SansSerifLarge" + height="20" + layout="topleft" + left="77" + name="noanswer" + top="27" + width="315" + word_wrap="true"> +No Answer. Please try again later. + </text> + <text font="SansSerif" height="50" layout="topleft" |