From ac3d4c2c3260f1462d76ff939de3b8b43509a810 Mon Sep 17 00:00:00 2001 From: CharleyLevenque Date: Wed, 25 Aug 2010 07:47:26 -0400 Subject: [PATCH] A whole bunch of fucking crap that didn't work while trying to restore the Pretend Inventory folder, fix for (temporary) not showing up near temp uploads. Temporary uploads still broken a bit -- Always show up at the very bottom of the texture folder, but goddamnit they work shut up. >:|| --- indra/newview/llfolderview.cpp | 6 ++++++ indra/newview/llinventoryactions.cpp | 8 ++++++++ indra/newview/llinventorybridge.cpp | 9 ++++++--- indra/newview/llstartup.cpp | 13 +++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 73b2d0d98..27e615e92 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -776,6 +776,12 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) { src = LLToolDragAndDrop::SOURCE_LIBRARY; } + // + else if(mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gLocalInventoryRoot)) + { // Note: this is only ok if all future pretend folders are subcategories of Pretend Inventory + src = LLToolDragAndDrop::SOURCE_LIBRARY; + } + // can_drag = root->startDrag(src); if (can_drag) diff --git a/indra/newview/llinventoryactions.cpp b/indra/newview/llinventoryactions.cpp index 37f79cf2e..41abf6558 100644 --- a/indra/newview/llinventoryactions.cpp +++ b/indra/newview/llinventoryactions.cpp @@ -472,6 +472,14 @@ class LLDoCreate : public inventory_panel_listener_t LLInventoryModel* model = mPtr->getModel(); if(!model) return false; std::string type = userdata.asString(); + // + if(type == "pretend") + { + LLFloaterNewLocalInventory* floater = new LLFloaterNewLocalInventory(); + floater->center(); + } + else + // do_create(model, mPtr, type, LLFolderBridge::sSelf); return true; } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6a5221199..ae76fd84c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1114,12 +1114,11 @@ std::string LLItemBridge::getLabelSuffix() const LLPermissions perm = item->getPermissions(); // if(perm.getOwner() == gAgent.getID()) - { BOOL copy = perm.allowCopyBy(gAgent.getID()); BOOL mod = perm.allowModifyBy(gAgent.getID()); - BOOL xfer = perm.allowOperationBy(PERM_TRANSFER, - gAgent.getID()); + BOOL xfer = perm.allowOperationBy(PERM_TRANSFER, gAgent.getID()); + // *TODO: Translate const char* EMPTY = ""; const char* NO_COPY = " (no copy)"; @@ -1140,6 +1139,10 @@ std::string LLItemBridge::getLabelSuffix() const else stempo = EMPTY; suffix = llformat("%s%s%s%s",scopy,smod,sxfer,stempo); } + else if (!perm.isOwned()) + { + suffix = " (temporary)"; + } } return suffix; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 4aa7d4a78..820ba699b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2145,6 +2145,19 @@ bool idle_startup() } } + // testing adding a local inventory folder... + LLViewerInventoryCategory* test_cat = new LLViewerInventoryCategory(gAgent.getID()); + test_cat->rename(std::string("Pretend Inventory")); + LLUUID test_cat_id; + test_cat_id.generate(); + test_cat->setUUID(test_cat_id); + gLocalInventoryRoot = test_cat_id; + test_cat->setParent(LLUUID::null); + test_cat->setPreferredType(LLAssetType::AT_NONE); + + gInventory.addCategory(test_cat); + // + // OGPX login-flags : we don't currently get those passed back (there is a gendered hack in the code elsewhere) // unsure if OGPX should be getting all these. if (LLUserAuth::getInstance()->mResult["login-flags"].isArray())