diff options
author | Richard Nelson <none@none> | 2010-07-30 10:07:14 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-07-30 10:07:14 -0700 |
commit | 50005b81f7788cd7a372ab3009568bdb9e024a6e (patch) | |
tree | 829bd18ebb1ec90234973a980979ca92cebe38ff /indra/newview/llpanelpermissions.cpp | |
parent | 2051ba7248f11af083bbda9cd8b67be99d0d844b (diff) | |
parent | 9b526997d93d9290602a86f91a7f096da4395d97 (diff) |
merge
Diffstat (limited to 'indra/newview/llpanelpermissions.cpp')
-rw-r--r-- | indra/newview/llpanelpermissions.cpp | 356 |
1 files changed, 178 insertions, 178 deletions
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 71d16a08b4..87e02bd5f4 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -142,9 +142,9 @@ LLPanelPermissions::LLPanelPermissions() : BOOL LLPanelPermissions::postBuild() { childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this); - childSetPrevalidate("Object Name",LLTextValidate::validateASCIIPrintableNoPipe); + getChild<LLLineEditor>("Object Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe); childSetCommitCallback("Object Description",LLPanelPermissions::onCommitDesc,this); - childSetPrevalidate("Object Description",LLTextValidate::validateASCIIPrintableNoPipe); + getChild<LLLineEditor>("Object Description")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickGroup,this)); @@ -183,81 +183,81 @@ LLPanelPermissions::~LLPanelPermissions() void LLPanelPermissions::disableAll() { - childSetEnabled("perm_modify", FALSE); - childSetText("perm_modify", LLStringUtil::null); - - childSetEnabled("Creator:", FALSE); - childSetText("Creator Name", LLStringUtil::null); - childSetEnabled("Creator Name", FALSE); - - childSetEnabled("Owner:", FALSE); - childSetText("Owner Name", LLStringUtil::null); - childSetEnabled("Owner Name", FALSE); - - childSetEnabled("Group:", FALSE); - childSetText("Group Name Proxy", LLStringUtil::null); - childSetEnabled("Group Name Proxy", FALSE); - childSetEnabled("button set group", FALSE); - - childSetText("Object Name", LLStringUtil::null); - childSetEnabled("Object Name", FALSE); - childSetEnabled("Name:", FALSE); - childSetText("Group Name", LLStringUtil::null); - childSetEnabled("Group Name", FALSE); - childSetEnabled("Description:", FALSE); - childSetText("Object Description", LLStringUtil::null); - childSetEnabled("Object Description", FALSE); - - childSetEnabled("Permissions:", FALSE); + getChildView("perm_modify")->setEnabled(FALSE); + getChild<LLUICtrl>("perm_modify")->setValue(LLStringUtil::null); + + getChildView("Creator:")->setEnabled(FALSE); + getChild<LLUICtrl>("Creator Name")->setValue(LLStringUtil::null); + getChildView("Creator Name")->setEnabled(FALSE); + + getChildView("Owner:")->setEnabled(FALSE); + getChild<LLUICtrl>("Owner Name")->setValue(LLStringUtil::null); + getChildView("Owner Name")->setEnabled(FALSE); + + getChildView("Group:")->setEnabled(FALSE); + getChild<LLUICtrl>("Group Name Proxy")->setValue(LLStringUtil::null); + getChildView("Group Name Proxy")->setEnabled(FALSE); + getChildView("button set group")->setEnabled(FALSE); + + getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null); + getChildView("Object Name")->setEnabled(FALSE); + getChildView("Name:")->setEnabled(FALSE); + getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null); + getChildView("Group Name")->setEnabled(FALSE); + getChildView("Description:")->setEnabled(FALSE); + getChild<LLUICtrl>("Object Description")->setValue(LLStringUtil::null); + getChildView("Object Description")->setEnabled(FALSE); + + getChildView("Permissions:")->setEnabled(FALSE); - childSetValue("checkbox share with group", FALSE); - childSetEnabled("checkbox share with group", FALSE); - childSetEnabled("button deed", FALSE); + getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE); + getChildView("checkbox share with group")->setEnabled(FALSE); + getChildView("button deed")->setEnabled(FALSE); - childSetValue("checkbox allow everyone move", FALSE); - childSetEnabled("checkbox allow everyone move", FALSE); - childSetValue("checkbox allow everyone copy", FALSE); - childSetEnabled("checkbox allow everyone copy", FALSE); + getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE); + getChildView("checkbox allow everyone move")->setEnabled(FALSE); + getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE); + getChildView("checkbox allow everyone copy")->setEnabled(FALSE); //Next owner can: - childSetEnabled("Next owner can:", FALSE); - childSetValue("checkbox next owner can modify", FALSE); - childSetEnabled("checkbox next owner can modify", FALSE); - childSetValue("checkbox next owner can copy", FALSE); - childSetEnabled("checkbox next owner can copy", FALSE); - childSetValue("checkbox next owner can transfer", FALSE); - childSetEnabled("checkbox next owner can transfer", FALSE); + getChildView("Next owner can:")->setEnabled(FALSE); + getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE); + getChildView("checkbox next owner can modify")->setEnabled(FALSE); + getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE); + getChildView("checkbox next owner can copy")->setEnabled(FALSE); + getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE); + getChildView("checkbox next owner can transfer")->setEnabled(FALSE); //checkbox for sale - childSetValue("checkbox for sale", FALSE); - childSetEnabled("checkbox for sale", FALSE); + getChild<LLUICtrl>("checkbox for sale")->setValue(FALSE); + getChildView("checkbox for sale")->setEnabled(FALSE); //checkbox include in search - childSetValue("search_check", FALSE); - childSetEnabled("search_check", FALSE); + getChild<LLUICtrl>("search_check")->setValue(FALSE); + getChildView("search_check")->setEnabled(FALSE); LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); combo_sale_type->setValue(LLSaleInfo::FS_COPY); combo_sale_type->setEnabled(FALSE); - childSetEnabled("Cost", FALSE); - childSetText("Cost", getString("Cost Default")); - childSetText("Edit Cost", LLStringUtil::null); - childSetEnabled("Edit Cost", FALSE); + getChildView("Cost")->setEnabled(FALSE); + getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default")); + getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null); + getChildView("Edit Cost")->setEnabled(FALSE); - childSetEnabled("label click action", FALSE); + getChildView("label click action")->setEnabled(FALSE); LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction"); if (combo_click_action) { combo_click_action->setEnabled(FALSE); combo_click_action->clear(); } - childSetVisible("B:", FALSE); - childSetVisible("O:", FALSE); - childSetVisible("G:", FALSE); - childSetVisible("E:", FALSE); - childSetVisible("N:", FALSE); - childSetVisible("F:", FALSE); + getChildView("B:")->setVisible( FALSE); + getChildView("O:")->setVisible( FALSE); + getChildView("G:")->setVisible( FALSE); + getChildView("E:")->setVisible( FALSE); + getChildView("N:")->setVisible( FALSE); + getChildView("F:")->setVisible( FALSE); } void LLPanelPermissions::refresh() @@ -323,23 +323,23 @@ void LLPanelPermissions::refresh() { ++string_index; } - childSetEnabled("perm_modify", TRUE); - childSetText("perm_modify", MODIFY_INFO_STRINGS[string_index]); + getChildView("perm_modify")->setEnabled(TRUE); + getChild<LLUICtrl>("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]); - childSetEnabled("Permissions:", TRUE); + getChildView("Permissions:")->setEnabled(TRUE); // Update creator text field - childSetEnabled("Creator:", TRUE); + getChildView("Creator:")->setEnabled(TRUE); BOOL creators_identical; std::string creator_name; creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); - childSetText("Creator Name", creator_name); - childSetEnabled("Creator Name", TRUE); + getChild<LLUICtrl>("Creator Name")->setValue(creator_name); + getChildView("Creator Name")->setEnabled(TRUE); // Update owner text field - childSetEnabled("Owner:", TRUE); + getChildView("Owner:")->setEnabled(TRUE); std::string owner_name; const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); @@ -364,12 +364,12 @@ void LLPanelPermissions::refresh() } } } - childSetText("Owner Name", owner_name); - childSetEnabled("Owner Name", TRUE); + getChild<LLUICtrl>("Owner Name")->setValue(owner_name); + getChildView("Owner Name")->setEnabled(TRUE); // update group text field - childSetEnabled("Group:", TRUE); - childSetText("Group Name", LLStringUtil::null); + getChildView("Group:")->setEnabled(TRUE); + getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) @@ -390,18 +390,18 @@ void LLPanelPermissions::refresh() } } - childSetEnabled("button set group", owners_identical && (mOwnerID == gAgent.getID())); + getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID())); - childSetEnabled("Name:", TRUE); + getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); - childSetEnabled("Description:", TRUE); + getChildView("Description:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); if (is_one_object) { if (keyboard_focus_view != LineEditorObjectName) { - childSetText("Object Name",nodep->mName); + getChild<LLUICtrl>("Object Name")->setValue(nodep->mName); } if (LineEditorObjectDesc) @@ -414,7 +414,7 @@ void LLPanelPermissions::refresh() } else { - childSetText("Object Name", LLStringUtil::null); + getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null); LineEditorObjectDesc->setText(LLStringUtil::null); } @@ -426,13 +426,13 @@ void LLPanelPermissions::refresh() } if (edit_name_desc) { - childSetEnabled("Object Name", TRUE); - childSetEnabled("Object Description", TRUE); + getChildView("Object Name")->setEnabled(TRUE); + getChildView("Object Description")->setEnabled(TRUE); } else { - childSetEnabled("Object Name", FALSE); - childSetEnabled("Object Description", FALSE); + getChildView("Object Name")->setEnabled(FALSE); + getChildView("Object Description")->setEnabled(FALSE); } S32 total_sale_price = 0; @@ -454,9 +454,9 @@ void LLPanelPermissions::refresh() if (!owners_identical) { - childSetEnabled("Cost", FALSE); - childSetText("Edit Cost", LLStringUtil::null); - childSetEnabled("Edit Cost", FALSE); + getChildView("Cost")->setEnabled(FALSE); + getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null); + getChildView("Edit Cost")->setEnabled(FALSE); } // You own these objects. else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) @@ -464,11 +464,11 @@ void LLPanelPermissions::refresh() // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { - childSetText("Cost", getString("Cost Per Unit")); + getChild<LLUICtrl>("Cost")->setValue(getString("Cost Per Unit")); } else { - childSetText("Cost", getString("Cost Default")); + getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default")); } LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); @@ -492,35 +492,35 @@ void LLPanelPermissions::refresh() // The edit fields are only enabled if you can sell this object // and the sale price is not mixed. BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE; - childSetEnabled("Cost", enable_edit); - childSetEnabled("Edit Cost", enable_edit); + getChildView("Cost")->setEnabled(enable_edit); + getChildView("Edit Cost")->setEnabled(enable_edit); } // Someone, not you, owns these objects. else if (!public_owned) { - childSetEnabled("Cost", FALSE); - childSetEnabled("Edit Cost", FALSE); + getChildView("Cost")->setEnabled(FALSE); + getChildView("Edit Cost")->setEnabled(FALSE); // Don't show a price if none of the items are for sale. if (num_for_sale) - childSetText("Edit Cost", llformat("%d",total_sale_price)); + getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",total_sale_price)); else - childSetText("Edit Cost", LLStringUtil::null); + getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null); // If multiple items are for sale, set text to TOTAL PRICE. if (num_for_sale > 1) - childSetText("Cost", getString("Cost Total")); + getChild<LLUICtrl>("Cost")->setValue(getString("Cost Total")); else - childSetText("Cost", getString("Cost Default")); + getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default")); } // This is a public object. else { - childSetEnabled("Cost", FALSE); - childSetText("Cost", getString("Cost Default")); + getChildView("Cost")->setEnabled(FALSE); + getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default")); - childSetText("Edit Cost", LLStringUtil::null); - childSetEnabled("Edit Cost", FALSE); + getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null); + getChildView("Edit Cost")->setEnabled(FALSE); } // Enable and disable the permissions checkboxes @@ -562,20 +562,20 @@ void LLPanelPermissions::refresh() { if (valid_base_perms) { - childSetText("B:", "B: " + mask_to_string(base_mask_on)); - childSetVisible("B:", TRUE); + getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string(base_mask_on)); + getChildView("B:")->setVisible( TRUE); - childSetText("O:", "O: " + mask_to_string(owner_mask_on)); - childSetVisible("O:", TRUE); + getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(owner_mask_on)); + getChildView("O:")->setVisible( TRUE); - childSetText("G:", "G: " + mask_to_string(group_mask_on)); - childSetVisible("G:", TRUE); + getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(group_mask_on)); + getChildView("G:")->setVisible( TRUE); - childSetText("E:", "E: " + mask_to_string(everyone_mask_on)); - childSetVisible("E:", TRUE); + getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(everyone_mask_on)); + getChildView("E:")->setVisible( TRUE); - childSetText("N:", "N: " + mask_to_string(next_owner_mask_on)); - childSetVisible("N:", TRUE); + getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(next_owner_mask_on)); + getChildView("N:")->setVisible( TRUE); } U32 flag_mask = 0x0; @@ -584,17 +584,17 @@ void LLPanelPermissions::refresh() if (objectp->permCopy()) flag_mask |= PERM_COPY; if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER; - childSetText("F:", "F:" + mask_to_string(flag_mask)); - childSetVisible("F:", TRUE); + getChild<LLUICtrl>("F:")->setValue("F:" + mask_to_string(flag_mask)); + getChildView("F:")->setVisible( TRUE); } else { - childSetVisible("B:", FALSE); - childSetVisible("O:", FALSE); - childSetVisible("G:", FALSE); - childSetVisible("E:", FALSE); - childSetVisible("N:", FALSE); - childSetVisible("F:", FALSE); + getChildView("B:")->setVisible( FALSE); + getChildView("O:")->setVisible( FALSE); + getChildView("G:")->setVisible( FALSE); + getChildView("E:")->setVisible( FALSE); + getChildView("N:")->setVisible( FALSE); + getChildView("F:")->setVisible( FALSE); } BOOL has_change_perm_ability = FALSE; @@ -614,65 +614,65 @@ void LLPanelPermissions::refresh() if (!has_change_perm_ability && !has_change_sale_ability && !root_selected) { // ...must select root to choose permissions - childSetValue("perm_modify", getString("text modify warning")); + getChild<LLUICtrl>("perm_modify")->setValue(getString("text modify warning")); } if (has_change_perm_ability) { - childSetEnabled("checkbox share with group", TRUE); - childSetEnabled("checkbox allow everyone move", owner_mask_on & PERM_MOVE); - childSetEnabled("checkbox allow everyone copy", owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); + getChildView("checkbox share with group")->setEnabled(TRUE); + getChildView("checkbox allow everyone move")->setEnabled(owner_mask_on & PERM_MOVE); + getChildView("checkbox allow everyone copy")->setEnabled(owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { - childSetEnabled("checkbox share with group", FALSE); - childSetEnabled("checkbox allow everyone move", FALSE); - childSetEnabled("checkbox allow everyone copy", FALSE); + getChildView("checkbox share with group")->setEnabled(FALSE); + getChildView("checkbox allow everyone move")->setEnabled(FALSE); + getChildView("checkbox allow everyone copy")->setEnabled(FALSE); } if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) { - childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale)); + getChildView("checkbox for sale")->setEnabled(can_transfer || (!can_transfer && num_for_sale)); // Set the checkbox to tentative if the prices of each object selected // are not the same. - childSetTentative("checkbox for sale", is_for_sale_mixed); - childSetEnabled("sale type", num_for_sale && can_transfer && !is_sale_price_mixed); + getChild<LLUICtrl>("checkbox for sale")->setTentative( is_for_sale_mixed); + getChildView("sale type")->setEnabled(num_for_sale && can_transfer && !is_sale_price_mixed); - childSetEnabled("Next owner can:", TRUE); - childSetEnabled("checkbox next owner can modify", base_mask_on & PERM_MODIFY); - childSetEnabled("checkbox next owner can copy", base_mask_on & PERM_COPY); - childSetEnabled("checkbox next owner can transfer", next_owner_mask_on & PERM_COPY); + getChildView("Next owner can:")->setEnabled(TRUE); + getChildView("checkbox next owner can modify")->setEnabled(base_mask_on & PERM_MODIFY); + getChildView("checkbox next owner can copy")->setEnabled(base_mask_on & PERM_COPY); + getChildView("checkbox next owner can transfer")->setEnabled(next_owner_mask_on & PERM_COPY); } else { - childSetEnabled("checkbox for sale", FALSE); - childSetEnabled("sale type", FALSE); + getChildView("checkbox for sale")->setEnabled(FALSE); + getChildView("sale type")->setEnabled(FALSE); - childSetEnabled("Next owner can:", FALSE); - childSetEnabled("checkbox next owner can modify", FALSE); - childSetEnabled("checkbox next owner can copy", FALSE); - childSetEnabled("checkbox next owner can transfer", FALSE); + getChildView("Next owner can:")->setEnabled(FALSE); + getChildView("checkbox next owner can modify")->setEnabled(FALSE); + getChildView("checkbox next owner can copy")->setEnabled(FALSE); + getChildView("checkbox next owner can transfer")->setEnabled(FALSE); } if (valid_group_perms) { if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) { - childSetValue("checkbox share with group", TRUE); - childSetTentative("checkbox share with group", FALSE); - childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); + getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE); + getChild<LLUICtrl>("checkbox share with group")->setTentative( FALSE); + getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) { - childSetValue("checkbox share with group", FALSE); - childSetTentative("checkbox share with group", FALSE); - childSetEnabled("button deed", FALSE); + getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE); + getChild<LLUICtrl>("checkbox share with group")->setTentative( FALSE); + getChildView("button deed")->setEnabled(FALSE); } else { - childSetValue("checkbox share with group", TRUE); - childSetTentative("checkbox share with group", TRUE); - childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); + getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE); + getChild<LLUICtrl>("checkbox share with group")->setTentative( TRUE); + getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } } @@ -681,35 +681,35 @@ void LLPanelPermissions::refresh() // Move if (everyone_mask_on & PERM_MOVE) { - childSetValue("checkbox allow everyone move", TRUE); - childSetTentative("checkbox allow everyone move", FALSE); + getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE); + getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( FALSE); } else if (everyone_mask_off & PERM_MOVE) { - childSetValue("checkbox allow everyone move", FALSE); - childSetTentative("checkbox allow everyone move", FALSE); + getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE); + getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( FALSE); } else { - childSetValue("checkbox allow everyone move", TRUE); - childSetTentative("checkbox allow everyone move", TRUE); + getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE); + getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( TRUE); } // Copy == everyone can't copy if (everyone_mask_on & PERM_COPY) { - childSetValue("checkbox allow everyone copy", TRUE); - childSetTentative("checkbox allow everyone copy", !can_copy || !can_transfer); + getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE); + getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( !can_copy || !can_transfer); } else if (everyone_mask_off & PERM_COPY) { - childSetValue("checkbox allow everyone copy", FALSE); - childSetTentative("checkbox allow everyone copy", FALSE); + getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE); + getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( FALSE); } else { - childSetValue("checkbox allow everyone copy", TRUE); - childSetTentative("checkbox allow everyone copy", TRUE); + getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE); + getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( TRUE); } } @@ -718,52 +718,52 @@ void LLPanelPermissions::refresh() // Modify == next owner canot modify if (next_owner_mask_on & PERM_MODIFY) { - childSetValue("checkbox next owner can modify", TRUE); - childSetTentative("checkbox next owner can modify", FALSE); + getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE); + getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( FALSE); } else if (next_owner_mask_off & PERM_MODIFY) { - childSetValue("checkbox next owner can modify", FALSE); - childSetTentative("checkbox next owner can modify", FALSE); + getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE); + getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( FALSE); } else { - childSetValue("checkbox next owner can modify", TRUE); - childSetTentative("checkbox next owner can modify", TRUE); + getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE); + getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( TRUE); } // Copy == next owner cannot copy if (next_owner_mask_on & PERM_COPY) { - childSetValue("checkbox next owner can copy", TRUE); - childSetTentative("checkbox next owner can copy", !can_copy); + getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE); + getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( !can_copy); } else if (next_owner_mask_off & PERM_COPY) { - childSetValue("checkbox next owner can copy", FALSE); - childSetTentative("checkbox next owner can copy", FALSE); + getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE); + getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( FALSE); } else { - childSetValue("checkbox next owner can copy", TRUE); - childSetTentative("checkbox next owner can copy", TRUE); + getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE); + getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( TRUE); } // Transfer == next owner cannot transfer if (next_owner_mask_on & PERM_TRANSFER) { - childSetValue("checkbox next owner can transfer", TRUE); - childSetTentative("checkbox next owner can transfer", !can_transfer); + getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE); + getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( !can_transfer); } else if (next_owner_mask_off & PERM_TRANSFER) { - childSetValue("checkbox next owner can transfer", FALSE); - childSetTentative("checkbox next owner can transfer", FALSE); + getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE); + getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( FALSE); } else { - childSetValue("checkbox next owner can transfer", TRUE); - childSetTentative("checkbox next owner can transfer", TRUE); + getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE); + getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( TRUE); } } @@ -785,7 +785,7 @@ void LLPanelPermissions::refresh() combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment. } - childSetValue("checkbox for sale", (num_for_sale != 0)); + getChild<LLUICtrl>("checkbox for sale")->setValue((num_for_sale != 0)); // HACK: There are some old objects in world that are set for sale, // but are no-transfer. We need to let users turn for-sale off, but only @@ -795,7 +795,7 @@ void LLPanelPermissions::refresh() { if (num_for_sale && has_change_sale_ability) { - childSetEnabled("checkbox for sale", true); + getChildView("checkbox for sale")->setEnabled(true); } } @@ -803,9 +803,9 @@ void LLPanelPermissions::refresh() const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); bool include_in_search; const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); - childSetEnabled("search_check", has_change_sale_ability && all_volume); - childSetValue("search_check", include_in_search); - childSetTentative("search_check", !all_include_in_search); + getChildView("search_check")->setEnabled(has_change_sale_ability && all_volume); + getChild<LLUICtrl>("search_check")->setValue(include_in_search); + getChild<LLUICtrl>("search_check")->setTentative( !all_include_in_search); // Click action (touch, sit, buy) U8 click_action = 0; @@ -818,8 +818,8 @@ void LLPanelPermissions::refresh() combo_click_action->setValue(LLSD(combo_value)); } } - childSetEnabled("label click action", is_perm_modify && all_volume); - childSetEnabled("clickaction", is_perm_modify && all_volume); + getChildView("label click action")->setEnabled(is_perm_modify && all_volume); + getChildView("clickaction")->setEnabled(is_perm_modify && all_volume); } |