From 152010b8c6f0c5e6aec1cf56176d767f70205411 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 9 Dec 2009 20:26:20 -0500 Subject: EXT-3063 cleanup of inventory item properties sidepanel step 1: kill the edit button step 2: disable info button on main inventory panel if more than one item is selected. other steps to be done will be filed as separate jiras code reviewed by seraph --HG-- branch : avatar-pipeline --- indra/newview/llsidepaneliteminfo.cpp | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'indra/newview/llsidepaneliteminfo.cpp') 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()); @@ -858,25 +869,6 @@ LLInventoryItem* LLSidepanelItemInfo::findItem() const return item; } -// 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() { -- cgit v1.2.3