diff options
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 03180b6a9d..585d42f66d 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -35,6 +35,7 @@ #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llcommandhandler.h" #include "llfloatercustomize.h" #include "llgesturemgr.h" #include "llinventorybridge.h" @@ -47,6 +48,23 @@ #include "llviewerregion.h" #include "llwearablelist.h" +// support for secondlife:///app/appearance SLapps +class LLAppearanceHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLAppearanceHandler() : LLCommandHandler("appearance", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + // support secondlife:///app/appearance/show, but for now we just + // make all secondlife:///app/appearance SLapps behave this way + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD()); + return true; + } +}; +LLAppearanceHandler gAppearanceHandler; + class LLWearInventoryCategoryCallback : public LLInventoryCallback { public: @@ -261,7 +279,10 @@ public: virtual ~LLUpdateAppearanceOnDestroy() { - LLAppearanceManager::instance().updateAppearanceFromCOF(); + if (!LLApp::isExiting()) + { + LLAppearanceManager::instance().updateAppearanceFromCOF(); + } } /* virtual */ void fire(const LLUUID& inv_item) @@ -274,11 +295,11 @@ private: struct LLFoundData { - LLFoundData() {} + LLFoundData() : mAssetType(LLAssetType::AT_NONE), mWearable(NULL) {} LLFoundData(const LLUUID& item_id, - const LLUUID& asset_id, - const std::string& name, - LLAssetType::EType asset_type) : + const LLUUID& asset_id, + const std::string& name, + LLAssetType::EType asset_type) : mItemID(item_id), mAssetID(asset_id), mName(name), @@ -1063,7 +1084,6 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up // MULTI-WEARABLES: revisit if more than one per type is allowed. else if (areMatchingWearables(vitem,inv_item)) { - gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); if (inv_item->getIsLinkType()) { gInventory.purgeObject(inv_item->getUUID()); |