summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneliteminfo.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-12-14 15:07:16 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-12-14 15:07:16 +0200
commitf493b62f868f5fb8fe8d9f7e0f5b0ff619eb8026 (patch)
tree2d337bacabec046e3c9f7e82d6e1c59f350af410 /indra/newview/llsidepaneliteminfo.cpp
parentf446e2b94d05315a09e3068b258a606986ec8872 (diff)
parenta763409647a5a8d82f2f1c54223b998877c3b72d (diff)
Merge from default branch.
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index ad6428e515..449bdefb8f 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -159,7 +159,6 @@ void LLSidepanelItemInfo::refresh()
setIsEditing(FALSE);
return;
}
- mEditBtn->setEnabled(FALSE);
}
if (!getIsEditing())
@@ -251,6 +250,18 @@ void LLSidepanelItemInfo::refreshFromItem(LLInventoryItem* item)
GP_OBJECT_MANIPULATE)
&& is_obj_modify && is_complete;
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ bool item_in_trash = item->getUUID() == trash_id || gInventory.isObjectDescendentOf(item->getUUID(), trash_id);
+
+ if (is_modifiable && !item_in_trash)
+ {
+ setIsEditing(TRUE);
+ }
+ else
+ {
+ setIsEditing(FALSE);
+ }
+
childSetEnabled("LabelItemNameTitle",TRUE);
childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
childSetText("LabelItemName",item->getName());
@@ -859,25 +870,6 @@ LLInventoryItem* LLSidepanelItemInfo::findItem() const
}
// virtual
-void LLSidepanelItemInfo::updateVerbs()
-{
- LLSidepanelInventorySubpanel::updateVerbs();
-
- const LLViewerInventoryItem* item = (LLViewerInventoryItem*)findItem();
- if (item)
- {
- const LLPermissions& perm = item->getPermissions();
- BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm,
- GP_OBJECT_MANIPULATE);
-
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- bool item_in_trash = item->getUUID() == trash_id || gInventory.isObjectDescendentOf(item->getUUID(), trash_id);
- mEditBtn->setEnabled(is_modifiable && !item_in_trash);
-
- }
-}
-
-// virtual
void LLSidepanelItemInfo::save()
{
onCommitName();