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.cpp57
1 files changed, 45 insertions, 12 deletions
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 4b49ae9f43..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
@@ -94,7 +97,7 @@ BOOL LLSidepanelTaskInfo::postBuild()
mPayBtn = getChild<LLButton>("pay_btn");
mPayBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onPayButtonClicked, this));
mBuyBtn = getChild<LLButton>("buy_btn");
- mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this));
+ mBuyBtn->setClickedCallback(boost::bind(&handle_buy));
mDetailsBtn = getChild<LLButton>("details_btn");
mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this));
@@ -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,8 +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 = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) ||
- LLSelectMgr::getInstance()->selectGetNonPermanent();
+ const BOOL is_nonpermanent_enforced = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) ||
+ LLSelectMgr::getInstance()->selectGetNonPermanentEnforced();
S32 string_index = 0;
std::string MODIFY_INFO_STRINGS[] =
@@ -318,7 +325,7 @@ void LLSidepanelTaskInfo::refresh()
{
string_index += 2;
}
- else if (!is_nonpermanent)
+ else if (!is_nonpermanent_enforced)
{
string_index += 4;
}
@@ -329,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
@@ -393,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");
@@ -423,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;
}
@@ -603,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;
@@ -820,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())
{
@@ -1122,8 +1157,6 @@ void LLSidepanelTaskInfo::doClickAction(U8 click_action)
// Set click action back to its old value
U8 click_action = 0;
LLSelectMgr::getInstance()->selectionGetClickAction(&click_action);
-// box->setCurrentByIndex((S32)click_action);
-
return;
}
}