diff options
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
| -rw-r--r-- | indra/newview/llviewerinventory.cpp | 35 | 
1 files changed, 21 insertions, 14 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index e2022cae37..6155058f14 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -71,6 +71,9 @@  #include "llclipboard.h"  #include "llhttpretrypolicy.h"  #include "llsettingsvo.h" +#include "llinventorylistener.h" + +LLInventoryListener sInventoryListener;  // do-nothing ops for use in callbacks.  void no_op_inventory_func(const LLUUID&) {} @@ -751,27 +754,30 @@ S32 LLViewerInventoryCategory::getViewerDescendentCount() const      return descendents_actual;  } -LLSD LLViewerInventoryCategory::exportLLSD() const +void LLViewerInventoryCategory::exportLLSD(LLSD & cat_data) const  { -    LLSD cat_data = LLInventoryCategory::exportLLSD(); +    LLInventoryCategory::exportLLSD(cat_data);      cat_data[INV_OWNER_ID] = mOwnerID;      cat_data[INV_VERSION] = mVersion; - -    return cat_data;  } -bool LLViewerInventoryCategory::importLLSD(const LLSD& cat_data) +bool LLViewerInventoryCategory::importLLSD(const std::string& label, const LLSD& value)  { -    LLInventoryCategory::importLLSD(cat_data); -    if (cat_data.has(INV_OWNER_ID)) +    if (LLInventoryCategory::importLLSD(label, value))      { -        mOwnerID = cat_data[INV_OWNER_ID].asUUID(); +        return true;      } -    if (cat_data.has(INV_VERSION)) +    else if (label == INV_OWNER_ID)      { -        setVersion(cat_data[INV_VERSION].asInteger()); +        mOwnerID = value.asUUID(); +        return true;      } -    return true; +    else if (label == INV_VERSION) +    { +        setVersion(value.asInteger()); +        return true; +    } +    return false;  }  bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item) @@ -966,7 +972,7 @@ void LLInventoryCallbackManager::fire(U32 callback_id, const LLUUID& item_id)      }  } -void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp) +void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp, bool replace)  {      if (inv_item.isNull())          return; @@ -974,7 +980,7 @@ void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachme      LLViewerInventoryItem *item = gInventory.getItem(inv_item);      if (item)      { -        rez_attachment(item, attachmentp); +        rez_attachment(item, attachmentp, replace);      }  } @@ -1436,7 +1442,8 @@ void update_inventory_category(      if(obj)      {          if (LLFolderType::lookupIsProtectedType(obj->getPreferredType()) -            && (updates.size() != 1 || !updates.has("thumbnail"))) +            && (updates.size() != 1 +                || !(updates.has("thumbnail") || updates.has("favorite"))))          {              LLNotificationsUtil::add("CannotModifyProtectedCategories");              return;  | 
