summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneltaskinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsidepaneltaskinfo.cpp')
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp394
1 files changed, 194 insertions, 200 deletions
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 3ab71eac64..4552088cad 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -4,31 +4,25 @@
* This class represents the panel in the build view for
* viewing/editing object names, owners, permissions, etc.
*
- * $LicenseInfo:firstyear=2002&license=viewergpl$
- *
- * Copyright (c) 2002-2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -107,9 +101,9 @@ BOOL LLSidepanelTaskInfo::postBuild()
mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this);
- childSetPrevalidate("Object Name", LLTextValidate::validateASCIIPrintableNoPipe);
+ getChild<LLLineEditor>("Object Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe);
childSetCommitCallback("Object Description", LLSidepanelTaskInfo::onCommitDesc,this);
- childSetPrevalidate("Object Description", LLTextValidate::validateASCIIPrintableNoPipe);
+ getChild<LLLineEditor>("Object Description")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLSidepanelTaskInfo::onClickGroup,this));
childSetCommitCallback("checkbox share with group", &LLSidepanelTaskInfo::onCommitGroupShare,this);
childSetAction("button deed", &LLSidepanelTaskInfo::onClickDeedToGroup,this);
@@ -144,81 +138,81 @@ BOOL LLSidepanelTaskInfo::postBuild()
void LLSidepanelTaskInfo::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", LLStringUtil::null);
- childSetEnabled("Group Name", 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")->setValue(LLStringUtil::null);
+ getChildView("Group Name")->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);
mOpenBtn->setEnabled(FALSE);
mPayBtn->setEnabled(FALSE);
@@ -289,23 +283,23 @@ void LLSidepanelTaskInfo::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);
@@ -330,12 +324,12 @@ void LLSidepanelTaskInfo::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)
@@ -356,18 +350,18 @@ void LLSidepanelTaskInfo::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 (!LineEditorObjectName->hasFocus())
{
- childSetText("Object Name",nodep->mName);
+ getChild<LLUICtrl>("Object Name")->setValue(nodep->mName);
}
if (LineEditorObjectDesc)
@@ -380,7 +374,7 @@ void LLSidepanelTaskInfo::refresh()
}
else
{
- childSetText("Object Name", LLStringUtil::null);
+ getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null);
LineEditorObjectDesc->setText(LLStringUtil::null);
}
@@ -392,13 +386,13 @@ void LLSidepanelTaskInfo::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;
@@ -420,9 +414,9 @@ void LLSidepanelTaskInfo::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)))
@@ -430,11 +424,11 @@ void LLSidepanelTaskInfo::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");
@@ -458,35 +452,35 @@ void LLSidepanelTaskInfo::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
@@ -528,20 +522,20 @@ void LLSidepanelTaskInfo::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;
@@ -550,17 +544,17 @@ void LLSidepanelTaskInfo::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;
@@ -580,65 +574,65 @@ void LLSidepanelTaskInfo::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);
}
}
@@ -647,35 +641,35 @@ void LLSidepanelTaskInfo::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);
}
}
@@ -684,52 +678,52 @@ void LLSidepanelTaskInfo::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);
}
}
@@ -751,7 +745,7 @@ void LLSidepanelTaskInfo::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
@@ -761,7 +755,7 @@ void LLSidepanelTaskInfo::refresh()
{
if (num_for_sale && has_change_sale_ability)
{
- childSetEnabled("checkbox for sale", true);
+ getChildView("checkbox for sale")->setEnabled(true);
}
}
@@ -769,9 +763,9 @@ void LLSidepanelTaskInfo::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;
@@ -783,8 +777,8 @@ void LLSidepanelTaskInfo::refresh()
ComboClickAction->setCurrentByIndex((S32)click_action);
}
}
- 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);
if (!getIsEditing())
{
@@ -810,7 +804,7 @@ void LLSidepanelTaskInfo::refresh()
};
for (size_t t=0; t<LL_ARRAY_SIZE(no_item_names); ++t)
{
- childSetEnabled(no_item_names[t], FALSE);
+ getChildView(no_item_names[t])->setEnabled( FALSE);
}
}
updateVerbs();