STORM-68 Fiddling with debugging for New Script case
parent
d61a5f743c
commit
b6df9b6d56
|
|
@ -151,7 +151,7 @@ void on_new_single_inventory_upload_complete(
|
|||
LLSaleInfo::DEFAULT,
|
||||
inventory_item_flags,
|
||||
creation_date_now);
|
||||
llwarns << "DBG -------------" << llendl;
|
||||
|
||||
gInventory.updateItem(item);
|
||||
gInventory.notifyObservers();
|
||||
success = true;
|
||||
|
|
|
|||
|
|
@ -168,14 +168,12 @@ void LLFloaterNameDesc::onBtnOK( )
|
|||
S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
|
||||
void *nruserdata = NULL;
|
||||
std::string display_name = LLStringUtil::null;
|
||||
LLPermissions perm;
|
||||
perm.setMaskNext(PERM_COPY);
|
||||
|
||||
upload_new_resource(mFilenameAndPath, // file
|
||||
getChild<LLUICtrl>("name_form")->getValue().asString(),
|
||||
getChild<LLUICtrl>("description_form")->getValue().asString(),
|
||||
0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
|
||||
perm.getMaskNextOwner(),
|
||||
// LLFloaterPerms::getNextOwnerPerms("Uploads"),
|
||||
LLFloaterPerms::getNextOwnerPerms("Uploads"),
|
||||
LLFloaterPerms::getGroupPerms("Uploads"),
|
||||
LLFloaterPerms::getEveryonePerms("Uploads"),
|
||||
display_name, callback, expected_upload_cost, nruserdata);
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ U32 LLFloaterPerms::getEveryonePerms(std::string prefix)
|
|||
//static
|
||||
U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
|
||||
{
|
||||
llwarns << "DBG prefix=" << prefix << llendl;
|
||||
|
||||
U32 flags = PERM_MOVE;
|
||||
if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -164,8 +164,8 @@ void LLPanelContents::onClickNewScript(void *userdata)
|
|||
PERM_ALL,
|
||||
PERM_NONE,
|
||||
PERM_NONE,
|
||||
PERM_ALL);
|
||||
// PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts"));
|
||||
// this does not work
|
||||
PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts"));
|
||||
std::string desc;
|
||||
LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc);
|
||||
LLPointer<LLViewerInventoryItem> new_item =
|
||||
|
|
|
|||
|
|
@ -2555,6 +2555,17 @@ void LLViewerObject::doUpdateInventory(
|
|||
doInventoryCallback();
|
||||
++mInventorySerialNum;
|
||||
}
|
||||
|
||||
if(is_new && mInventory)
|
||||
{
|
||||
std::string name = item->getName();
|
||||
llwarns << "DBG " << name << llendl;
|
||||
LLPermissions perm = item->getPermissions();
|
||||
perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts"));
|
||||
perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts"));
|
||||
perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts"));
|
||||
item->setPermissions(perm);
|
||||
}
|
||||
}
|
||||
|
||||
// save a script, which involves removing the old one, and rezzing
|
||||
|
|
@ -2573,13 +2584,8 @@ void LLViewerObject::saveScript(
|
|||
*/
|
||||
lldebugs << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << llendl;
|
||||
|
||||
LLPermissions perm = item->getPermissions();
|
||||
perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts"));
|
||||
perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts"));
|
||||
perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts"));
|
||||
|
||||
LLPointer<LLViewerInventoryItem> task_item =
|
||||
new LLViewerInventoryItem(item->getUUID(), mID, perm,
|
||||
new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(),
|
||||
item->getAssetUUID(), item->getType(),
|
||||
item->getInventoryType(),
|
||||
item->getName(), item->getDescription(),
|
||||
|
|
@ -2603,8 +2609,6 @@ void LLViewerObject::saveScript(
|
|||
|
||||
// do the internal logic
|
||||
doUpdateInventory(task_item, TASK_INVENTORY_ITEM_KEY, is_new);
|
||||
llwarns << "DBG is_new:" << is_new << llendl;
|
||||
task_item->setPermissions(perm);
|
||||
}
|
||||
|
||||
void LLViewerObject::moveInventory(const LLUUID& folder_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue