summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2012-06-09 11:43:39 -0400
committerJonathan Yap <none@none>2012-06-09 11:43:39 -0400
commitb6df9b6d56108bcf4b3e8dfd875ef76a9b6f448b (patch)
tree6b1f12b9235f3a2c6d785d91615ffa26ce32b650 /indra/newview
parentd61a5f743c5d3bde0146b036508485bfdc9c3cb5 (diff)
STORM-68 Fiddling with debugging for New Script case
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llassetuploadresponders.cpp2
-rw-r--r--indra/newview/llfloaternamedesc.cpp6
-rw-r--r--indra/newview/llfloaterperms.cpp2
-rw-r--r--indra/newview/llpanelcontents.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp20
5 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index c4a2d8fca5..65bfc990d1 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -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;
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index 97671a8614..ee7f413a59 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -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);
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index ede17d937e..3853dd0ef6 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -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") )
{
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index f180afa037..db4b679c50 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -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 =
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a494e934b0..57549e025c 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -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,