diff options
Diffstat (limited to 'indra/newview/llsidepaneltaskinfo.cpp')
-rw-r--r-- | indra/newview/llsidepaneltaskinfo.cpp | 57 |
1 files changed, 50 insertions, 7 deletions
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 64b82aa0bb..c351b1a128 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -61,6 +61,9 @@ #include "llspinctrl.h" #include "roles_constants.h" #include "llgroupactions.h" +#include "lltextbase.h" +#include "llstring.h" +#include "lltrans.h" ///---------------------------------------------------------------------------- /// Class llsidepaneltaskinfo @@ -146,6 +149,7 @@ BOOL LLSidepanelTaskInfo::postBuild() mDAEditCost = getChild<LLUICtrl>("Edit Cost"); mDALabelClickAction = getChildView("label click action"); mDAComboClickAction = getChild<LLComboBox>("clickaction"); + mDAPathfindingAttributes = getChild<LLTextBase>("pathfinding_attributes_value"); mDAB = getChildView("B:"); mDAO = getChildView("O:"); mDAG = getChildView("G:"); @@ -242,6 +246,9 @@ void LLSidepanelTaskInfo::disableAll() mDAComboClickAction->clear(); } + mDAPathfindingAttributes->setEnabled(FALSE); + mDAPathfindingAttributes->setValue(LLStringUtil::null); + mDAB->setVisible(FALSE); mDAO->setVisible(FALSE); mDAG->setVisible(FALSE); @@ -301,6 +308,8 @@ void LLSidepanelTaskInfo::refresh() // BUG: fails if a root and non-root are both single-selected. const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); + const BOOL is_nonpermanent_enforced = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || + LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = @@ -308,12 +317,18 @@ void LLSidepanelTaskInfo::refresh() getString("text modify info 1"), getString("text modify info 2"), getString("text modify info 3"), - getString("text modify info 4") + getString("text modify info 4"), + getString("text modify info 5"), + getString("text modify info 6") }; if (!is_perm_modify) { string_index += 2; } + else if (!is_nonpermanent_enforced) + { + string_index += 4; + } if (!is_one_object) { ++string_index; @@ -321,6 +336,34 @@ void LLSidepanelTaskInfo::refresh() getChildView("perm_modify")->setEnabled(TRUE); getChild<LLUICtrl>("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]); + std::string pfAttrName; + + if ((mObjectSelection->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonPathfinding()) + || LLSelectMgr::getInstance()->selectGetNonPathfinding()) + { + pfAttrName = "Pathfinding_Object_Attr_None"; + } + else if ((mObjectSelection->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsPermanent()) + || LLSelectMgr::getInstance()->selectGetPermanent()) + { + pfAttrName = "Pathfinding_Object_Attr_Permanent"; + } + else if ((mObjectSelection->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsCharacter()) + || LLSelectMgr::getInstance()->selectGetCharacter()) + { + pfAttrName = "Pathfinding_Object_Attr_Character"; + } + else + { + pfAttrName = "Pathfinding_Object_Attr_MultiSelect"; + } + + mDAPathfindingAttributes->setEnabled(TRUE); + mDAPathfindingAttributes->setValue(LLTrans::getString(pfAttrName)); + getChildView("Permissions:")->setEnabled(TRUE); // Update creator text field @@ -385,7 +428,7 @@ void LLSidepanelTaskInfo::refresh() } } - getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID())); + getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); @@ -415,7 +458,7 @@ void LLSidepanelTaskInfo::refresh() // figure out the contents of the name, description, & category BOOL edit_name_desc = FALSE; - if (is_one_object && objectp->permModify()) + if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced()) { edit_name_desc = TRUE; } @@ -595,12 +638,12 @@ void LLSidepanelTaskInfo::refresh() BOOL has_change_perm_ability = FALSE; BOOL has_change_sale_ability = FALSE; - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { has_change_perm_ability = TRUE; } - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { has_change_sale_ability = TRUE; @@ -812,8 +855,8 @@ void LLSidepanelTaskInfo::refresh() ComboClickAction->setCurrentByIndex((S32)click_action); } } - getChildView("label click action")->setEnabled(is_perm_modify && all_volume); - getChildView("clickaction")->setEnabled(is_perm_modify && all_volume); + getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume); + getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume); if (!getIsEditing()) { |