diff options
Diffstat (limited to 'indra/newview/llfloaterproperties.cpp')
-rw-r--r-- | indra/newview/llfloaterproperties.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index ff9002787c..30b654de24 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -38,12 +38,12 @@ #include "llcachename.h" #include "lldbstrings.h" #include "llfloaterreg.h" -#include "llinventory.h" #include "llagent.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llavataractions.h" +#include "llinventorydefines.h" #include "llinventoryobserver.h" #include "llinventorymodel.h" #include "lllineeditor.h" @@ -130,9 +130,9 @@ BOOL LLFloaterProperties::postBuild() { // build the UI // item name & description - childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe); + childSetPrevalidate("LabelItemName",&LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitName,this)); - childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe); + childSetPrevalidate("LabelItemDesc",&LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLFloaterProperties:: onCommitDescription, this)); // Creator information getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this)); @@ -237,7 +237,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // do not enable the UI for incomplete items. LLViewerInventoryItem* i = (LLViewerInventoryItem*)item; - BOOL is_complete = i->isComplete(); + BOOL is_complete = i->isFinished(); const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType()); const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD); const LLPermissions& perm = item->getPermissions(); @@ -380,9 +380,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) if (item->getType() == LLAssetType::AT_OBJECT) { U32 flags = item->getFlags(); - slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM; - overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; - overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; + slam_perm = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM; + overwrite_everyone = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; + overwrite_group = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } std::string perm_string; @@ -683,7 +683,7 @@ void LLFloaterProperties::onCommitPermissions() CheckNextOwnerTransfer->get(), PERM_TRANSFER); } if(perm != item->getPermissions() - && item->isComplete()) + && item->isFinished()) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); new_item->setPermissions(perm); @@ -693,7 +693,7 @@ void LLFloaterProperties::onCommitPermissions() if((perm.getMaskNextOwner()!=item->getPermissions().getMaskNextOwner()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM; } // If everyone permissions have changed (and this is an object) // then set the overwrite everyone permissions flag so they @@ -701,7 +701,7 @@ void LLFloaterProperties::onCommitPermissions() if ((perm.getMaskEveryone()!=item->getPermissions().getMaskEveryone()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; } // If group permissions have changed (and this is an object) // then set the overwrite group permissions flag so they @@ -709,7 +709,7 @@ void LLFloaterProperties::onCommitPermissions() if ((perm.getMaskGroup()!=item->getPermissions().getMaskGroup()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } new_item->setFlags(flags); if(mObjectID.isNull()) @@ -813,7 +813,7 @@ void LLFloaterProperties::updateSaleInfo() sale_info.setSaleType(LLSaleInfo::FS_NOT); } if(sale_info != item->getSaleInfo() - && item->isComplete()) + && item->isFinished()) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); @@ -821,7 +821,7 @@ void LLFloaterProperties::updateSaleInfo() if (item->getType() == LLAssetType::AT_OBJECT) { U32 flags = new_item->getFlags(); - flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE; new_item->setFlags(flags); } @@ -880,7 +880,11 @@ void LLFloaterProperties::dirtyAll() iter != inst_list.end(); ++iter) { LLFloaterProperties* floater = dynamic_cast<LLFloaterProperties*>(*iter); - floater->dirty(); + llassert(floater); // else cast failed - wrong type D: + if (floater) + { + floater->dirty(); + } } } |