diff options
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rw-r--r-- | indra/newview/llsidepaneliteminfo.cpp | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index dc441f1c05..0a76a1f48f 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -292,16 +292,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // do not enable the UI for incomplete items. bool is_complete = item->isFinished(); - const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); - const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); - const BOOL is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS); + const bool cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); + const bool is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); + const bool is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS); const LLPermissions& perm = item->getPermissions(); - const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, + const bool can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); - const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, + const bool can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_SET_SALE) && !cannot_restrict_permissions; - const BOOL is_link = item->getIsLinkType(); + const bool is_link = item->getIsLinkType(); const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); bool not_in_trash = (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); @@ -310,7 +310,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // item in it. LLViewerObject* object = NULL; if(!mObjectID.isNull()) object = gObjectList.findObject(mObjectID); - BOOL is_obj_modify = TRUE; + bool is_obj_modify = true; if(object) { is_obj_modify = object->permOwnerModify(); @@ -318,10 +318,10 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if(item->getInventoryType() == LLInventoryType::IT_LSL) { - getChildView("LabelItemExperienceTitle")->setVisible(TRUE); + getChildView("LabelItemExperienceTitle")->setVisible(true); LLTextBox* tb = getChild<LLTextBox>("LabelItemExperience"); tb->setText(getString("loading_experience")); - tb->setVisible(TRUE); + tb->setVisible(true); std::string url = std::string(); if(object && object->getRegion()) { @@ -334,19 +334,19 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) ////////////////////// // ITEM NAME & DESC // ////////////////////// - BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm, + bool is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE) && is_obj_modify && is_complete && not_in_trash; - getChildView("LabelItemNameTitle")->setEnabled(TRUE); + 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("LabelItemDescTitle")->setEnabled(true); getChildView("LabelItemDesc")->setEnabled(is_modifiable); getChild<LLUICtrl>("LabelItemDesc")->setValue(item->getDescription()); getChild<LLUICtrl>("item_thumbnail")->setValue(item->getThumbnailUUID()); - LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE); + LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), false); mItemTypeIcon->setImage(icon_img); // Style for creator and owner links @@ -389,13 +389,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) mCreatorCacheConnection = LLAvatarNameCache::get(creator_id, boost::bind(&LLSidepanelItemInfo::updateCreatorName, this, _1, _2, style_params)); } - getChildView("LabelCreatorTitle")->setEnabled(TRUE); - mLabelCreatorName->setEnabled(TRUE); + getChildView("LabelCreatorTitle")->setEnabled(true); + mLabelCreatorName->setEnabled(true); } else { - getChildView("LabelCreatorTitle")->setEnabled(FALSE); - mLabelCreatorName->setEnabled(FALSE); + getChildView("LabelCreatorTitle")->setEnabled(false); + mLabelCreatorName->setEnabled(false); mLabelCreatorName->setValue(getString("unknown_multiple")); } @@ -446,13 +446,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) mOwnerCacheConnection = LLAvatarNameCache::get(owner_id, boost::bind(&LLSidepanelItemInfo::updateOwnerName, this, _1, _2, style_params)); } } - getChildView("LabelOwnerTitle")->setEnabled(TRUE); - mLabelOwnerName->setEnabled(TRUE); + getChildView("LabelOwnerTitle")->setEnabled(true); + mLabelOwnerName->setEnabled(true); } else { - getChildView("LabelOwnerTitle")->setEnabled(FALSE); - mLabelOwnerName->setEnabled(FALSE); + getChildView("LabelOwnerTitle")->setEnabled(false); + mLabelOwnerName->setEnabled(false); mLabelOwnerName->setValue(getString("public")); } @@ -554,12 +554,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) U32 everyone_mask = perm.getMaskEveryone(); U32 next_owner_mask = perm.getMaskNextOwner(); - 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))); + 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 // @@ -569,9 +569,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { childSetVisible("layout_debug_permissions", true); - BOOL slam_perm = FALSE; - BOOL overwrite_group = FALSE; - BOOL overwrite_everyone = FALSE; + bool slam_perm = false; + bool overwrite_group = false; + bool overwrite_everyone = false; if (item->getType() == LLAssetType::AT_OBJECT) { @@ -618,42 +618,42 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // Check for ability to change values. if (is_link || cannot_restrict_permissions) { - getChildView("CheckShareWithGroup")->setEnabled(FALSE); - getChildView("CheckEveryoneCopy")->setEnabled(FALSE); + getChildView("CheckShareWithGroup")->setEnabled(false); + getChildView("CheckEveryoneCopy")->setEnabled(false); } else if (is_obj_modify && can_agent_manipulate) { - getChildView("CheckShareWithGroup")->setEnabled(TRUE); + getChildView("CheckShareWithGroup")->setEnabled(true); getChildView("CheckEveryoneCopy")->setEnabled((owner_mask & PERM_COPY) && (owner_mask & PERM_TRANSFER)); } else { - getChildView("CheckShareWithGroup")->setEnabled(FALSE); - getChildView("CheckEveryoneCopy")->setEnabled(FALSE); + getChildView("CheckShareWithGroup")->setEnabled(false); + getChildView("CheckEveryoneCopy")->setEnabled(false); } // Set values. - BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE; - BOOL is_group_modify = (group_mask & PERM_MODIFY) ? TRUE : FALSE; - BOOL is_group_move = (group_mask & PERM_MOVE) ? TRUE : FALSE; + bool is_group_copy = (group_mask & PERM_COPY) ? true : false; + bool is_group_modify = (group_mask & PERM_MODIFY) ? true : false; + bool is_group_move = (group_mask & PERM_MOVE) ? true : false; if (is_group_copy && is_group_modify && is_group_move) { - getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)TRUE)); + getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((bool)true)); LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(FALSE); + ctl->setTentative(false); } } else if (!is_group_copy && !is_group_modify && !is_group_move) { - getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)FALSE)); + getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((bool)false)); LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(FALSE); + ctl->setTentative(false); } } else @@ -662,11 +662,11 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if(ctl) { ctl->setTentative(!ctl->getEnabled()); - ctl->set(TRUE); + ctl->set(true); } } - getChild<LLUICtrl>("CheckEveryoneCopy")->setValue(LLSD((BOOL)(everyone_mask & PERM_COPY))); + getChild<LLUICtrl>("CheckEveryoneCopy")->setValue(LLSD((bool)(everyone_mask & PERM_COPY))); /////////////// // SALE INFO // @@ -683,7 +683,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { getChildView("CheckPurchase")->setEnabled(is_complete); - getChildView("NextOwnerLabel")->setEnabled(TRUE); + getChildView("NextOwnerLabel")->setEnabled(true); getChildView("CheckNextOwnerModify")->setEnabled((base_mask & PERM_MODIFY) && !cannot_restrict_permissions); getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions && !is_settings); getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); @@ -693,15 +693,15 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) } else { - getChildView("CheckPurchase")->setEnabled(FALSE); + getChildView("CheckPurchase")->setEnabled(false); - getChildView("NextOwnerLabel")->setEnabled(FALSE); - getChildView("CheckNextOwnerModify")->setEnabled(FALSE); - getChildView("CheckNextOwnerCopy")->setEnabled(FALSE); - getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE); + getChildView("NextOwnerLabel")->setEnabled(false); + getChildView("CheckNextOwnerModify")->setEnabled(false); + getChildView("CheckNextOwnerCopy")->setEnabled(false); + getChildView("CheckNextOwnerTransfer")->setEnabled(false); - combo_sale_type->setEnabled(FALSE); - edit_cost->setEnabled(FALSE); + combo_sale_type->setEnabled(false); + edit_cost->setEnabled(false); } // Hide any properties that are not relevant to settings @@ -725,9 +725,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // Set values. getChild<LLUICtrl>("CheckPurchase")->setValue(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))); + 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))); if (is_for_sale) { @@ -1066,10 +1066,10 @@ void LLSidepanelItemInfo::updateSaleInfo() LLSaleInfo sale_info(item->getSaleInfo()); if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE)) { - getChild<LLUICtrl>("CheckPurchase")->setValue(LLSD((BOOL)FALSE)); + getChild<LLUICtrl>("CheckPurchase")->setValue(LLSD((bool)false)); } - if((BOOL)getChild<LLUICtrl>("CheckPurchase")->getValue()) + if((bool)getChild<LLUICtrl>("CheckPurchase")->getValue()) { // turn on sale info LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY; |