From 566e3969f98c7ac10fe151ba119a78ac5eda2e3c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 30 Jul 2010 10:02:30 -0700 Subject: deprecated LLPanel::child*() methods --- indra/newview/llsidepaneliteminfo.cpp | 188 +++++++++++++++++----------------- 1 file changed, 94 insertions(+), 94 deletions(-) (limited to 'indra/newview/llsidepaneliteminfo.cpp') diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index d9870e81c5..56bb7167b6 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -110,9 +110,9 @@ BOOL LLSidepanelItemInfo::postBuild() { LLSidepanelInventorySubpanel::postBuild(); - childSetPrevalidate("LabelItemName",&LLTextValidate::validateASCIIPrintableNoPipe); + getChild("LabelItemName")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); getChild("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this)); - childSetPrevalidate("LabelItemDesc",&LLTextValidate::validateASCIIPrintableNoPipe); + getChild("LabelItemDesc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); getChild("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this)); // Creator information getChild("BtnCreator")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickCreator,this)); @@ -193,7 +193,7 @@ void LLSidepanelItemInfo::refresh() for(size_t t=0; tsetEnabled(false); } const std::string hide_names[]={ @@ -205,7 +205,7 @@ void LLSidepanelItemInfo::refresh() }; for(size_t t=0; tsetVisible(false); } } @@ -217,7 +217,7 @@ void LLSidepanelItemInfo::refresh() }; for(size_t t=0; tsetEnabled(false); } } @@ -265,13 +265,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) GP_OBJECT_MANIPULATE) && is_obj_modify && is_complete && not_in_trash; - 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("LabelItemName")->setValue(item->getName()); + getChildView("LabelItemDescTitle")->setEnabled(TRUE); + getChildView("LabelItemDesc")->setEnabled(is_modifiable); + getChildView("IconLocked")->setVisible(!is_modifiable); + getChild("LabelItemDesc")->setValue(item->getDescription()); ////////////////// // CREATOR NAME // @@ -283,17 +283,17 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* 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("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("LabelCreatorName")->setValue(getString("unknown")); } //////////////// @@ -310,17 +310,17 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* 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("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("LabelOwnerName")->setValue(getString("public")); } //////////// @@ -329,11 +329,11 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if (object) { - childSetText("origin",getString("origin_inworld")); + getChild("origin")->setValue(getString("origin_inworld")); } else { - childSetText("origin",getString("origin_inventory")); + getChild("origin")->setValue(getString("origin_inventory")); } ////////////////// @@ -343,7 +343,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) time_t time_utc = item->getCreationDate(); if (0 == time_utc) { - childSetText("LabelAcquiredDate",getString("unknown")); + getChild("LabelAcquiredDate")->setValue(getString("unknown")); } else { @@ -351,7 +351,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) LLSD substitution; substitution["datetime"] = (S32) time_utc; LLStringUtil::format (timeStr, substitution); - childSetText ("LabelAcquiredDate", timeStr); + getChild("LabelAcquiredDate")->setValue(timeStr); } ////////////////////////////////////// @@ -394,12 +394,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { for(size_t t=0; tsetVisible(false); } for(size_t t=0; tsetVisible(false); } return; } @@ -407,7 +407,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { for(size_t t=0; tsetVisible(true); } } @@ -416,11 +416,11 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) /////////////////////// if(can_agent_manipulate) { - childSetText("OwnerLabel",getString("you_can")); + getChild("OwnerLabel")->setValue(getString("you_can")); } else { - childSetText("OwnerLabel",getString("owner_can")); + getChild("OwnerLabel")->setValue(getString("owner_can")); } U32 base_mask = perm.getMaskBase(); @@ -429,13 +429,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* 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("CheckOwnerModify")->setValue(LLSD((BOOL)(owner_mask & PERM_MODIFY))); + getChildView("CheckOwnerCopy")->setEnabled(FALSE); + getChild("CheckOwnerCopy")->setValue(LLSD((BOOL)(owner_mask & PERM_COPY))); + getChildView("CheckOwnerTransfer")->setEnabled(FALSE); + getChild("CheckOwnerTransfer")->setValue(LLSD((BOOL)(owner_mask & PERM_TRANSFER))); /////////////////////// // DEBUG PERMISSIONS // @@ -459,39 +459,39 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) perm_string = "B: "; perm_string += mask_to_string(base_mask); - childSetText("BaseMaskDebug",perm_string); - childSetVisible("BaseMaskDebug",TRUE); + getChild("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("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("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("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("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); } ///////////// @@ -501,18 +501,18 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* 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. @@ -522,7 +522,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if (is_group_copy && is_group_modify && is_group_move) { - childSetValue("CheckShareWithGroup",LLSD((BOOL)TRUE)); + getChild("CheckShareWithGroup")->setValue(LLSD((BOOL)TRUE)); LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) @@ -532,7 +532,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) } else if (!is_group_copy && !is_group_modify && !is_group_move) { - childSetValue("CheckShareWithGroup",LLSD((BOOL)FALSE)); + getChild("CheckShareWithGroup")->setValue(LLSD((BOOL)FALSE)); LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) { @@ -549,7 +549,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) } } - childSetValue("CheckEveryoneCopy",LLSD((BOOL)(everyone_mask & PERM_COPY))); + getChild("CheckEveryoneCopy")->setValue(LLSD((BOOL)(everyone_mask & PERM_COPY))); /////////////// // SALE INFO // @@ -561,48 +561,48 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* 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("TextPrice",is_complete && is_for_sale); - childSetEnabled("Edit Cost",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("TextPrice",FALSE); - childSetEnabled("Edit Cost",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("CheckPurchase")->setValue(is_for_sale); + getChildView("combobox sale copy")->setEnabled(is_for_sale); + getChildView("Edit Cost")->setEnabled(is_for_sale); + getChild("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); + getChild("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY))); + getChild("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER))); if (is_for_sale) { S32 numerical_price; numerical_price = sale_info.getSalePrice(); - childSetText("Edit Cost",llformat("%d",numerical_price)); + getChild("Edit Cost")->setValue(llformat("%d",numerical_price)); } else { - childSetText("Edit Cost",llformat("%d",0)); + getChild("Edit Cost")->setValue(llformat("%d",0)); } } @@ -823,10 +823,10 @@ void LLSidepanelItemInfo::updateSaleInfo() LLSaleInfo sale_info(item->getSaleInfo()); if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE)) { - childSetValue("CheckPurchase",LLSD((BOOL)FALSE)); + getChild("CheckPurchase")->setValue(LLSD((BOOL)FALSE)); } - if((BOOL)childGetValue("CheckPurchase")) + if((BOOL)getChild("CheckPurchase")->getValue()) { // turn on sale info LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY; -- cgit v1.2.3