Merge branch 'master' into dev_localinv
Conflicts: .gitignore deleted: indra/lib/python/indra/__init__.pyc deleted: indra/lib/python/indra/base/__init__.pyc deleted: indra/lib/python/indra/base/llsd.pyc deleted: indra/lib/python/indra/base/lluuid.pyc deleted: indra/lib/python/indra/ipc/__init__.pyc deleted: indra/lib/python/indra/ipc/compatibility.pyc deleted: indra/lib/python/indra/ipc/llmessage.pyc deleted: indra/lib/python/indra/ipc/tokenstream.pyc deleted: indra/lib/python/indra/util/__init__.pyc deleted: indra/lib/python/indra/util/fastest_elementtree.pyc deleted: indra/lib/python/indra/util/helpformatter.pyc deleted: indra/lib/python/indra/util/llmanifest.pyc deleted: indra/lib/python/uuid.pyc modified: indra/newview/dofloaterhex.cpp modified: indra/newview/doinventorybackup.cpp modified: indra/newview/hgfloatertexteditor.cpp modified: indra/newview/llinventorybridge.cpp
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -101,16 +101,19 @@ BOOL DOFloaterHex::postBuild(void)
|
|||||||
}
|
}
|
||||||
setTitle(title);
|
setTitle(title);
|
||||||
}
|
}
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
if(mItem->getCreatorUUID() == gAgentID)
|
if(mItem->getCreatorUUID() == gAgentID)
|
||||||
{
|
{
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
// Load the asset
|
// Load the asset
|
||||||
editor->setVisible(FALSE);
|
editor->setVisible(FALSE);
|
||||||
childSetText("status_text", std::string("Loading..."));
|
childSetText("status_text", std::string("Loading..."));
|
||||||
DOInventoryBackup::download(mItem, this, imageCallback, assetCallback);
|
DOInventoryBackup::download(mItem, this, imageCallback, assetCallback);
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
} else {
|
} else {
|
||||||
this->close(false);
|
this->close(false);
|
||||||
}
|
}
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,9 +304,11 @@ void DOInventoryBackup::download(LLInventoryItem* item, LLFloater* floater, load
|
|||||||
userdata->item = item;
|
userdata->item = item;
|
||||||
LLViewerImage* imagep;
|
LLViewerImage* imagep;
|
||||||
|
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
//don't be a jerk. (this check probably breaks stuff)
|
//don't be a jerk. (this check probably breaks stuff)
|
||||||
if(item->getCreatorUUID() == gAgentID)
|
if(item->getCreatorUUID() == gAgentID)
|
||||||
{
|
{
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
switch(item->getType())
|
switch(item->getType())
|
||||||
{
|
{
|
||||||
case LLAssetType::AT_TEXTURE:
|
case LLAssetType::AT_TEXTURE:
|
||||||
@@ -338,7 +340,9 @@ void DOInventoryBackup::download(LLInventoryItem* item, LLFloater* floater, load
|
|||||||
gAssetStorage->getAssetData(item->getAssetUUID(), item->getType(), onAsset, userdata, TRUE);
|
gAssetStorage->getAssetData(item->getAssetUUID(), item->getType(), onAsset, userdata, TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
}
|
}
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|||||||
@@ -82,16 +82,19 @@ BOOL HGFloaterTextEditor::postBuild(void)
|
|||||||
}
|
}
|
||||||
setTitle(title);
|
setTitle(title);
|
||||||
}
|
}
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
if(mItem->getCreatorUUID() == gAgentID)
|
if(mItem->getCreatorUUID() == gAgentID)
|
||||||
{
|
{
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
// Load the asset
|
// Load the asset
|
||||||
editor->setVisible(FALSE);
|
editor->setVisible(FALSE);
|
||||||
childSetText("status_text", std::string("Loading..."));
|
childSetText("status_text", std::string("Loading..."));
|
||||||
DOInventoryBackup::download(mItem, this, imageCallback, assetCallback);
|
DOInventoryBackup::download(mItem, this, imageCallback, assetCallback);
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
} else {
|
} else {
|
||||||
this->close(false);
|
this->close(false);
|
||||||
}
|
}
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -772,14 +772,18 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
|
|||||||
{
|
{
|
||||||
LLInventoryItem* item = model->getItem(mUUID);
|
LLInventoryItem* item = model->getItem(mUUID);
|
||||||
if(!item) return;
|
if(!item) return;
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
if(item->getCreatorUUID() != gAgentID) return;
|
if(item->getCreatorUUID() != gAgentID) return;
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
DOFloaterHex::show(mUUID);
|
DOFloaterHex::show(mUUID);
|
||||||
}
|
}
|
||||||
else if("open text" == action)
|
else if("open text" == action)
|
||||||
{
|
{
|
||||||
LLInventoryItem* item = model->getItem(mUUID);
|
LLInventoryItem* item = model->getItem(mUUID);
|
||||||
if(!item) return;
|
if(!item) return;
|
||||||
|
#if OPENSIM_RULES!=1
|
||||||
if(item->getCreatorUUID() != gAgentID) return;
|
if(item->getCreatorUUID() != gAgentID) return;
|
||||||
|
#endif /* OPENSIM_RULES!=1 */
|
||||||
HGFloaterTextEditor::show(mUUID);
|
HGFloaterTextEditor::show(mUUID);
|
||||||
}
|
}
|
||||||
else if ("copy_uuid" == action)
|
else if ("copy_uuid" == action)
|
||||||
|
|||||||
@@ -84,9 +84,6 @@
|
|||||||
#include "llselectmgr.h"
|
#include "llselectmgr.h"
|
||||||
|
|
||||||
#include "llsdserialize.h"
|
#include "llsdserialize.h"
|
||||||
// <edit>
|
|
||||||
#include "llbuildnewviewsscheduler.h"
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
static LLRegisterWidget<LLInventoryPanel> r("inventory_panel");
|
static LLRegisterWidget<LLInventoryPanel> r("inventory_panel");
|
||||||
|
|
||||||
@@ -485,15 +482,16 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
init_inventory_actions(this);
|
init_inventory_actions(this);
|
||||||
|
|
||||||
// Controls
|
// Controls
|
||||||
U32 sort_order = gSavedSettings.getU32("InventorySortOrder");
|
|
||||||
BOOL sort_by_name = ! ( sort_order & LLInventoryFilter::SO_DATE );
|
|
||||||
BOOL sort_folders_by_name = ( sort_order & LLInventoryFilter::SO_FOLDERS_BY_NAME );
|
|
||||||
BOOL sort_system_folders_to_top = ( sort_order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP );
|
|
||||||
addBoolControl("Inventory.ShowFilters", FALSE);
|
addBoolControl("Inventory.ShowFilters", FALSE);
|
||||||
addBoolControl("Inventory.SortByName", sort_by_name );
|
addBoolControl("Inventory.SortByName", FALSE);
|
||||||
addBoolControl("Inventory.SortByDate", ! sort_by_name );
|
addBoolControl("Inventory.SortByDate", TRUE);
|
||||||
addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name );
|
addBoolControl("Inventory.FoldersAlwaysByName", TRUE);
|
||||||
addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top );
|
addBoolControl("Inventory.SystemFoldersToTop", TRUE);
|
||||||
|
updateSortControls();
|
||||||
|
|
||||||
|
addBoolControl("Inventory.SearchName", TRUE);
|
||||||
|
addBoolControl("Inventory.SearchDesc", FALSE);
|
||||||
|
addBoolControl("Inventory.SearchCreator", FALSE);
|
||||||
|
|
||||||
mSavedFolderState = new LLSaveFolderState();
|
mSavedFolderState = new LLSaveFolderState();
|
||||||
mSavedFolderState->setApply(FALSE);
|
mSavedFolderState->setApply(FALSE);
|
||||||
@@ -507,7 +505,7 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
if (mActivePanel)
|
if (mActivePanel)
|
||||||
{
|
{
|
||||||
// "All Items" is the previous only view, so it gets the InventorySortOrder
|
// "All Items" is the previous only view, so it gets the InventorySortOrder
|
||||||
mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder"));
|
mActivePanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
|
||||||
mActivePanel->getFilter()->markDefault();
|
mActivePanel->getFilter()->markDefault();
|
||||||
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
||||||
mActivePanel->setSelectCallback(onSelectionChange, mActivePanel);
|
mActivePanel->setSelectCallback(onSelectionChange, mActivePanel);
|
||||||
@@ -1250,9 +1248,6 @@ const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventoryS
|
|||||||
const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder");
|
const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder");
|
||||||
const std::string LLInventoryPanel::WORNITEMS_SORT_ORDER = std::string("WornItemsSortOrder");
|
const std::string LLInventoryPanel::WORNITEMS_SORT_ORDER = std::string("WornItemsSortOrder");
|
||||||
const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string("");
|
const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string("");
|
||||||
// <edit>
|
|
||||||
std::list<LLInventoryPanel*> LLInventoryPanel::sInstances;
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
LLInventoryPanel::LLInventoryPanel(const std::string& name,
|
LLInventoryPanel::LLInventoryPanel(const std::string& name,
|
||||||
const std::string& sort_order_setting,
|
const std::string& sort_order_setting,
|
||||||
@@ -1268,9 +1263,6 @@ LLInventoryPanel::LLInventoryPanel(const std::string& name,
|
|||||||
mAllowMultiSelect(allow_multi_select),
|
mAllowMultiSelect(allow_multi_select),
|
||||||
mSortOrderSetting(sort_order_setting)
|
mSortOrderSetting(sort_order_setting)
|
||||||
{
|
{
|
||||||
// <edit>
|
|
||||||
sInstances.push_back(this);
|
|
||||||
// </edit>
|
|
||||||
setBackgroundColor(gColors.getColor("InventoryBackgroundColor"));
|
setBackgroundColor(gColors.getColor("InventoryBackgroundColor"));
|
||||||
setBackgroundVisible(TRUE);
|
setBackgroundVisible(TRUE);
|
||||||
setBackgroundOpaque(TRUE);
|
setBackgroundOpaque(TRUE);
|
||||||
@@ -1323,10 +1315,6 @@ BOOL LLInventoryPanel::postBuild()
|
|||||||
|
|
||||||
LLInventoryPanel::~LLInventoryPanel()
|
LLInventoryPanel::~LLInventoryPanel()
|
||||||
{
|
{
|
||||||
// <edit>
|
|
||||||
sInstances.remove(this);
|
|
||||||
gBuildNewViewsScheduler->cancel(this);
|
|
||||||
// </edit>
|
|
||||||
// should this be a global setting?
|
// should this be a global setting?
|
||||||
U32 sort_order = mFolders->getSortOrder();
|
U32 sort_order = mFolders->getSortOrder();
|
||||||
if (mSortOrderSetting != INHERIT_SORT_ORDER)
|
if (mSortOrderSetting != INHERIT_SORT_ORDER)
|
||||||
@@ -1647,9 +1635,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||||||
for(S32 i = 0; i < count; ++i)
|
for(S32 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
LLInventoryCategory* cat = categories->get(i);
|
LLInventoryCategory* cat = categories->get(i);
|
||||||
// <edit>
|
buildNewViews(cat->getUUID());
|
||||||
gBuildNewViewsScheduler->addJob(this, cat);
|
|
||||||
// </edit>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(items)
|
if(items)
|
||||||
@@ -1658,111 +1644,12 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||||||
for(S32 i = 0; i < count; ++i)
|
for(S32 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
LLInventoryItem* item = items->get(i);
|
LLInventoryItem* item = items->get(i);
|
||||||
// <edit>
|
buildNewViews(item->getUUID());
|
||||||
gBuildNewViewsScheduler->addJob(this, item);
|
|
||||||
// </edit>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mInventory->unlockDirectDescendentArrays(id);
|
mInventory->unlockDirectDescendentArrays(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// <edit>
|
|
||||||
void LLInventoryPanel::buildNewViews(const LLInventoryObject* objectp)
|
|
||||||
{
|
|
||||||
LLFolderViewItem* itemp = NULL;
|
|
||||||
|
|
||||||
if (objectp)
|
|
||||||
{
|
|
||||||
if (objectp->getType() <= LLAssetType::AT_NONE ||
|
|
||||||
objectp->getType() >= LLAssetType::AT_COUNT)
|
|
||||||
{
|
|
||||||
llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
|
|
||||||
<< ((S32) objectp->getType())
|
|
||||||
<< " (shouldn't happen)" << llendl;
|
|
||||||
}
|
|
||||||
else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category
|
|
||||||
{
|
|
||||||
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
|
|
||||||
LLInventoryType::IT_CATEGORY,
|
|
||||||
this,
|
|
||||||
objectp->getUUID());
|
|
||||||
|
|
||||||
if (new_listener)
|
|
||||||
{
|
|
||||||
LLFolderViewFolder* folderp = new LLFolderViewFolder(new_listener->getDisplayName(),
|
|
||||||
new_listener->getIcon(),
|
|
||||||
mFolders,
|
|
||||||
new_listener);
|
|
||||||
|
|
||||||
folderp->setItemSortOrder(mFolders->getSortOrder());
|
|
||||||
itemp = folderp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // build new view for item
|
|
||||||
{
|
|
||||||
LLInventoryItem* item = (LLInventoryItem*)objectp;
|
|
||||||
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(
|
|
||||||
item->getType(),
|
|
||||||
item->getInventoryType(),
|
|
||||||
this,
|
|
||||||
item->getUUID(),
|
|
||||||
item->getFlags());
|
|
||||||
if (new_listener)
|
|
||||||
{
|
|
||||||
itemp = new LLFolderViewItem(new_listener->getDisplayName(),
|
|
||||||
new_listener->getIcon(),
|
|
||||||
new_listener->getCreationDate(),
|
|
||||||
mFolders,
|
|
||||||
new_listener);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(objectp->getParentUUID());
|
|
||||||
|
|
||||||
if (itemp)
|
|
||||||
{
|
|
||||||
// <edit>
|
|
||||||
itemp->mDelayedDelete = TRUE;
|
|
||||||
// </edit>
|
|
||||||
if (parent_folder)
|
|
||||||
{
|
|
||||||
itemp->addToFolder(parent_folder, mFolders);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
|
|
||||||
delete itemp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!objectp || (objectp && (objectp->getType() == LLAssetType::AT_CATEGORY)))
|
|
||||||
{
|
|
||||||
LLViewerInventoryCategory::cat_array_t* categories;
|
|
||||||
LLViewerInventoryItem::item_array_t* items;
|
|
||||||
|
|
||||||
mInventory->lockDirectDescendentArrays((objectp != NULL) ? objectp->getUUID() : LLUUID::null, categories, items);
|
|
||||||
if(categories)
|
|
||||||
{
|
|
||||||
S32 count = categories->count();
|
|
||||||
for(S32 i = 0; i < count; ++i)
|
|
||||||
{
|
|
||||||
LLInventoryCategory* cat = categories->get(i);
|
|
||||||
buildNewViews(cat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(items)
|
|
||||||
{
|
|
||||||
S32 count = items->count();
|
|
||||||
for(S32 i = 0; i < count; ++i)
|
|
||||||
{
|
|
||||||
LLInventoryItem* item = items->get(i);
|
|
||||||
buildNewViews(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mInventory->unlockDirectDescendentArrays(objectp->getUUID());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct LLConfirmPurgeData
|
struct LLConfirmPurgeData
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user