summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterproperties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterproperties.cpp')
-rw-r--r--indra/newview/llfloaterproperties.cpp202
1 files changed, 101 insertions, 101 deletions
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 5c0593ad29..b6a98bdada 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",&LLTextValidate::validateASCIIPrintableNoPipe);
+ getChild<LLLineEditor>("LabelItemName")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitName,this));
- childSetPrevalidate("LabelItemDesc",&LLTextValidate::validateASCIIPrintableNoPipe);
+ getChild<LLLineEditor>("LabelItemDesc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLFloaterProperties:: onCommitDescription, this));
// Creator information
getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this));
@@ -201,7 +201,7 @@ void LLFloaterProperties::refresh()
};
for(size_t t=0; t<LL_ARRAY_SIZE(enableNames); ++t)
{
- childSetEnabled(enableNames[t],false);
+ getChildView(enableNames[t])->setEnabled(false);
}
const char* hideNames[]={
"BaseMaskDebug",
@@ -212,7 +212,7 @@ void LLFloaterProperties::refresh()
};
for(size_t t=0; t<LL_ARRAY_SIZE(hideNames); ++t)
{
- childSetVisible(hideNames[t],false);
+ getChildView(hideNames[t])->setVisible(false);
}
}
}
@@ -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();
@@ -265,13 +265,13 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
GP_OBJECT_MANIPULATE)
&& is_obj_modify && is_complete;
- childSetEnabled("LabelItemNameTitle",TRUE);
- childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
- childSetText("LabelItemName",item->getName());
- childSetEnabled("LabelItemDescTitle",TRUE);
- childSetEnabled("LabelItemDesc",is_modifiable);
- childSetVisible("IconLocked",!is_modifiable);
- childSetText("LabelItemDesc",item->getDescription());
+ getChildView("LabelItemNameTitle")->setEnabled(TRUE);
+ getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
+ getChild<LLUICtrl>("LabelItemName")->setValue(item->getName());
+ getChildView("LabelItemDescTitle")->setEnabled(TRUE);
+ getChildView("LabelItemDesc")->setEnabled(is_modifiable);
+ getChildView("IconLocked")->setVisible(!is_modifiable);
+ getChild<LLUICtrl>("LabelItemDesc")->setValue(item->getDescription());
//////////////////
// CREATOR NAME //
@@ -283,17 +283,17 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
{
std::string name;
gCacheName->getFullName(item->getCreatorUUID(), name);
- childSetEnabled("BtnCreator",TRUE);
- childSetEnabled("LabelCreatorTitle",TRUE);
- childSetEnabled("LabelCreatorName",TRUE);
- childSetText("LabelCreatorName",name);
+ getChildView("BtnCreator")->setEnabled(TRUE);
+ getChildView("LabelCreatorTitle")->setEnabled(TRUE);
+ getChildView("LabelCreatorName")->setEnabled(TRUE);
+ getChild<LLUICtrl>("LabelCreatorName")->setValue(name);
}
else
{
- childSetEnabled("BtnCreator",FALSE);
- childSetEnabled("LabelCreatorTitle",FALSE);
- childSetEnabled("LabelCreatorName",FALSE);
- childSetText("LabelCreatorName",getString("unknown"));
+ getChildView("BtnCreator")->setEnabled(FALSE);
+ getChildView("LabelCreatorTitle")->setEnabled(FALSE);
+ getChildView("LabelCreatorName")->setEnabled(FALSE);
+ getChild<LLUICtrl>("LabelCreatorName")->setValue(getString("unknown"));
}
////////////////
@@ -310,17 +310,17 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
{
gCacheName->getFullName(perm.getOwner(), name);
}
- childSetEnabled("BtnOwner",TRUE);
- childSetEnabled("LabelOwnerTitle",TRUE);
- childSetEnabled("LabelOwnerName",TRUE);
- childSetText("LabelOwnerName",name);
+ getChildView("BtnOwner")->setEnabled(TRUE);
+ getChildView("LabelOwnerTitle")->setEnabled(TRUE);
+ getChildView("LabelOwnerName")->setEnabled(TRUE);
+ getChild<LLUICtrl>("LabelOwnerName")->setValue(name);
}
else
{
- childSetEnabled("BtnOwner",FALSE);
- childSetEnabled("LabelOwnerTitle",FALSE);
- childSetEnabled("LabelOwnerName",FALSE);
- childSetText("LabelOwnerName",getString("public"));
+ getChildView("BtnOwner")->setEnabled(FALSE);
+ getChildView("LabelOwnerTitle")->setEnabled(FALSE);
+ getChildView("LabelOwnerName")->setEnabled(FALSE);
+ getChild<LLUICtrl>("LabelOwnerName")->setValue(getString("public"));
}
//////////////////
@@ -330,7 +330,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
time_t time_utc = item->getCreationDate();
if (0 == time_utc)
{
- childSetText("LabelAcquiredDate",getString("unknown"));
+ getChild<LLUICtrl>("LabelAcquiredDate")->setValue(getString("unknown"));
}
else
{
@@ -338,7 +338,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
LLSD substitution;
substitution["datetime"] = (S32) time_utc;
LLStringUtil::format (timeStr, substitution);
- childSetText ("LabelAcquiredDate", timeStr);
+ getChild<LLUICtrl>("LabelAcquiredDate")->setValue(timeStr);
}
///////////////////////
@@ -346,11 +346,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
///////////////////////
if(can_agent_manipulate)
{
- childSetText("OwnerLabel",getString("you_can"));
+ getChild<LLUICtrl>("OwnerLabel")->setValue(getString("you_can"));
}
else
{
- childSetText("OwnerLabel",getString("owner_can"));
+ getChild<LLUICtrl>("OwnerLabel")->setValue(getString("owner_can"));
}
U32 base_mask = perm.getMaskBase();
@@ -359,13 +359,13 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
U32 everyone_mask = perm.getMaskEveryone();
U32 next_owner_mask = perm.getMaskNextOwner();
- childSetEnabled("OwnerLabel",TRUE);
- childSetEnabled("CheckOwnerModify",FALSE);
- childSetValue("CheckOwnerModify",LLSD((BOOL)(owner_mask & PERM_MODIFY)));
- childSetEnabled("CheckOwnerCopy",FALSE);
- childSetValue("CheckOwnerCopy",LLSD((BOOL)(owner_mask & PERM_COPY)));
- childSetEnabled("CheckOwnerTransfer",FALSE);
- childSetValue("CheckOwnerTransfer",LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
+ getChildView("OwnerLabel")->setEnabled(TRUE);
+ getChildView("CheckOwnerModify")->setEnabled(FALSE);
+ getChild<LLUICtrl>("CheckOwnerModify")->setValue(LLSD((BOOL)(owner_mask & PERM_MODIFY)));
+ getChildView("CheckOwnerCopy")->setEnabled(FALSE);
+ getChild<LLUICtrl>("CheckOwnerCopy")->setValue(LLSD((BOOL)(owner_mask & PERM_COPY)));
+ getChildView("CheckOwnerTransfer")->setEnabled(FALSE);
+ getChild<LLUICtrl>("CheckOwnerTransfer")->setValue(LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
///////////////////////
// DEBUG PERMISSIONS //
@@ -380,48 +380,48 @@ 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;
perm_string = "B: ";
perm_string += mask_to_string(base_mask);
- childSetText("BaseMaskDebug",perm_string);
- childSetVisible("BaseMaskDebug",TRUE);
+ getChild<LLUICtrl>("BaseMaskDebug")->setValue(perm_string);
+ getChildView("BaseMaskDebug")->setVisible(TRUE);
perm_string = "O: ";
perm_string += mask_to_string(owner_mask);
- childSetText("OwnerMaskDebug",perm_string);
- childSetVisible("OwnerMaskDebug",TRUE);
+ getChild<LLUICtrl>("OwnerMaskDebug")->setValue(perm_string);
+ getChildView("OwnerMaskDebug")->setVisible(TRUE);
perm_string = "G";
perm_string += overwrite_group ? "*: " : ": ";
perm_string += mask_to_string(group_mask);
- childSetText("GroupMaskDebug",perm_string);
- childSetVisible("GroupMaskDebug",TRUE);
+ getChild<LLUICtrl>("GroupMaskDebug")->setValue(perm_string);
+ getChildView("GroupMaskDebug")->setVisible(TRUE);
perm_string = "E";
perm_string += overwrite_everyone ? "*: " : ": ";
perm_string += mask_to_string(everyone_mask);
- childSetText("EveryoneMaskDebug",perm_string);
- childSetVisible("EveryoneMaskDebug",TRUE);
+ getChild<LLUICtrl>("EveryoneMaskDebug")->setValue(perm_string);
+ getChildView("EveryoneMaskDebug")->setVisible(TRUE);
perm_string = "N";
perm_string += slam_perm ? "*: " : ": ";
perm_string += mask_to_string(next_owner_mask);
- childSetText("NextMaskDebug",perm_string);
- childSetVisible("NextMaskDebug",TRUE);
+ getChild<LLUICtrl>("NextMaskDebug")->setValue(perm_string);
+ getChildView("NextMaskDebug")->setVisible(TRUE);
}
else
{
- childSetVisible("BaseMaskDebug",FALSE);
- childSetVisible("OwnerMaskDebug",FALSE);
- childSetVisible("GroupMaskDebug",FALSE);
- childSetVisible("EveryoneMaskDebug",FALSE);
- childSetVisible("NextMaskDebug",FALSE);
+ getChildView("BaseMaskDebug")->setVisible(FALSE);
+ getChildView("OwnerMaskDebug")->setVisible(FALSE);
+ getChildView("GroupMaskDebug")->setVisible(FALSE);
+ getChildView("EveryoneMaskDebug")->setVisible(FALSE);
+ getChildView("NextMaskDebug")->setVisible(FALSE);
}
/////////////
@@ -431,18 +431,18 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
// Check for ability to change values.
if (is_link || cannot_restrict_permissions)
{
- childSetEnabled("CheckShareWithGroup",FALSE);
- childSetEnabled("CheckEveryoneCopy",FALSE);
+ getChildView("CheckShareWithGroup")->setEnabled(FALSE);
+ getChildView("CheckEveryoneCopy")->setEnabled(FALSE);
}
else if (is_obj_modify && can_agent_manipulate)
{
- childSetEnabled("CheckShareWithGroup",TRUE);
- childSetEnabled("CheckEveryoneCopy",(owner_mask & PERM_COPY) && (owner_mask & PERM_TRANSFER));
+ getChildView("CheckShareWithGroup")->setEnabled(TRUE);
+ getChildView("CheckEveryoneCopy")->setEnabled((owner_mask & PERM_COPY) && (owner_mask & PERM_TRANSFER));
}
else
{
- childSetEnabled("CheckShareWithGroup",FALSE);
- childSetEnabled("CheckEveryoneCopy",FALSE);
+ getChildView("CheckShareWithGroup")->setEnabled(FALSE);
+ getChildView("CheckEveryoneCopy")->setEnabled(FALSE);
}
// Set values.
@@ -452,7 +452,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
if (is_group_copy && is_group_modify && is_group_move)
{
- childSetValue("CheckShareWithGroup",LLSD((BOOL)TRUE));
+ getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)TRUE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
@@ -462,7 +462,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
}
else if (!is_group_copy && !is_group_modify && !is_group_move)
{
- childSetValue("CheckShareWithGroup",LLSD((BOOL)FALSE));
+ getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)FALSE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
@@ -479,7 +479,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
}
}
- childSetValue("CheckEveryoneCopy",LLSD((BOOL)(everyone_mask & PERM_COPY)));
+ getChild<LLUICtrl>("CheckEveryoneCopy")->setValue(LLSD((BOOL)(everyone_mask & PERM_COPY)));
///////////////
// SALE INFO //
@@ -491,40 +491,40 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
if (is_obj_modify && can_agent_sell
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
{
- childSetEnabled("SaleLabel",is_complete);
- childSetEnabled("CheckPurchase",is_complete);
+ getChildView("SaleLabel")->setEnabled(is_complete);
+ getChildView("CheckPurchase")->setEnabled(is_complete);
- childSetEnabled("NextOwnerLabel",TRUE);
- childSetEnabled("CheckNextOwnerModify",(base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
- childSetEnabled("CheckNextOwnerCopy",(base_mask & PERM_COPY) && !cannot_restrict_permissions);
- childSetEnabled("CheckNextOwnerTransfer",(next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
+ getChildView("NextOwnerLabel")->setEnabled(TRUE);
+ getChildView("CheckNextOwnerModify")->setEnabled((base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
+ getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions);
+ getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
- childSetEnabled("RadioSaleType",is_complete && is_for_sale);
- childSetEnabled("TextPrice",is_complete && is_for_sale);
- childSetEnabled("Edit Cost",is_complete && is_for_sale);
+ getChildView("RadioSaleType")->setEnabled(is_complete && is_for_sale);
+ getChildView("TextPrice")->setEnabled(is_complete && is_for_sale);
+ getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale);
}
else
{
- childSetEnabled("SaleLabel",FALSE);
- childSetEnabled("CheckPurchase",FALSE);
+ getChildView("SaleLabel")->setEnabled(FALSE);
+ getChildView("CheckPurchase")->setEnabled(FALSE);
- childSetEnabled("NextOwnerLabel",FALSE);
- childSetEnabled("CheckNextOwnerModify",FALSE);
- childSetEnabled("CheckNextOwnerCopy",FALSE);
- childSetEnabled("CheckNextOwnerTransfer",FALSE);
+ getChildView("NextOwnerLabel")->setEnabled(FALSE);
+ getChildView("CheckNextOwnerModify")->setEnabled(FALSE);
+ getChildView("CheckNextOwnerCopy")->setEnabled(FALSE);
+ getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
- childSetEnabled("RadioSaleType",FALSE);
- childSetEnabled("TextPrice",FALSE);
- childSetEnabled("Edit Cost",FALSE);
+ getChildView("RadioSaleType")->setEnabled(FALSE);
+ getChildView("TextPrice")->setEnabled(FALSE);
+ getChildView("Edit Cost")->setEnabled(FALSE);
}
// Set values.
- childSetValue("CheckPurchase", is_for_sale);
- childSetEnabled("combobox sale copy", is_for_sale);
- childSetEnabled("Edit Cost", is_for_sale);
- childSetValue("CheckNextOwnerModify",LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
- childSetValue("CheckNextOwnerCopy",LLSD(BOOL(next_owner_mask & PERM_COPY)));
- childSetValue("CheckNextOwnerTransfer",LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
+ getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
+ getChildView("combobox sale copy")->setEnabled(is_for_sale);
+ getChildView("Edit Cost")->setEnabled(is_for_sale);
+ getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
+ getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
+ getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
if (is_for_sale)
@@ -532,12 +532,12 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
S32 numerical_price;
numerical_price = sale_info.getSalePrice();
- childSetText("Edit Cost",llformat("%d",numerical_price));
+ getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price));
}
else
{
radioSaleType->setSelectedIndex(-1);
- childSetText("Edit Cost",llformat("%d",0));
+ getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",0));
}
}
@@ -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())
@@ -758,10 +758,10 @@ void LLFloaterProperties::updateSaleInfo()
LLSaleInfo sale_info(item->getSaleInfo());
if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE))
{
- childSetValue("CheckPurchase",LLSD((BOOL)FALSE));
+ getChild<LLUICtrl>("CheckPurchase")->setValue(LLSD((BOOL)FALSE));
}
- if((BOOL)childGetValue("CheckPurchase"))
+ if((BOOL)getChild<LLUICtrl>("CheckPurchase")->getValue())
{
// turn on sale info
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
@@ -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);
}