summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-01-06 12:26:02 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-01-06 12:26:02 -0500
commit71460d3e7eda8166f714067b2f53314c77e66b33 (patch)
tree2a24cefad8f28f5ccc684001edf62d9586fae56e
parent447a908a0a46e6e0ad6ac5e8a3a26260d865243b (diff)
parenta84beb2a4373d71b0ff171883af9645f9a98e26f (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp29
-rw-r--r--indra/newview/llpaneloutfitsinventory.h1
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml6
4 files changed, 35 insertions, 7 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 8e14074de1..4e26314fc3 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -303,6 +303,8 @@ void LLPanelOutfitsInventory::onClipboardAction(const LLSD& userdata)
{
std::string command_name = userdata.asString();
getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name);
+ updateListCommands();
+ updateVerbs();
}
void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata)
@@ -343,6 +345,8 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata)
{
onClipboardAction("delete");
}
+ updateListCommands();
+ updateVerbs();
}
BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
@@ -354,9 +358,9 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
LLFolderView *folder = getActivePanel()->getRootFolder();
if (folder)
{
- can_delete = TRUE;
std::set<LLUUID> selection_set;
folder->getSelectionList(selection_set);
+ can_delete = (selection_set.size() > 0);
for (std::set<LLUUID>::iterator iter = selection_set.begin();
iter != selection_set.end();
++iter)
@@ -375,9 +379,9 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
LLFolderView *folder = getActivePanel()->getRootFolder();
if (folder)
{
- can_delete = TRUE;
std::set<LLUUID> selection_set;
folder->getSelectionList(selection_set);
+ can_delete = (selection_set.size() > 0);
for (std::set<LLUUID>::iterator iter = selection_set.begin();
iter != selection_set.end();
++iter)
@@ -391,10 +395,14 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
}
return FALSE;
}
+ if (command_name == "rename" ||
+ command_name == "delete_outfit")
+ {
+ return (getCorrectListenerForAction() != NULL) && hasItemsSelected();
+ }
if (command_name == "edit" ||
command_name == "wear" ||
- command_name == "add" ||
- command_name == "remove"
+ command_name == "add"
)
{
return (getCorrectListenerForAction() != NULL);
@@ -402,6 +410,19 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
return TRUE;
}
+bool LLPanelOutfitsInventory::hasItemsSelected()
+{
+ bool has_items_selected = false;
+ LLFolderView *folder = getActivePanel()->getRootFolder();
+ if (folder)
+ {
+ std::set<LLUUID> selection_set;
+ folder->getSelectionList(selection_set);
+ has_items_selected = (selection_set.size() > 0);
+ }
+ return has_items_selected;
+}
+
bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept)
{
*accept = ACCEPT_NO;
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 1e084750a0..77ed15dd96 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -114,6 +114,7 @@ protected:
BOOL isActionEnabled(const LLSD& command_name);
void onCustomAction(const LLSD& command_name);
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
+ bool hasItemsSelected();
private:
LLPanel* mListCommands;
LLMenuGL* mMenuGearDefault;
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 50cec3184d..0b8f66c5f3 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -215,6 +215,10 @@ void LLSidepanelTaskInfo::disableAll()
childSetVisible("E:", FALSE);
childSetVisible("N:", FALSE);
childSetVisible("F:", FALSE);
+
+ mOpenBtn->setEnabled(FALSE);
+ mPayBtn->setEnabled(FALSE);
+ mBuyBtn->setEnabled(FALSE);
}
void LLSidepanelTaskInfo::refresh()
@@ -1119,6 +1123,8 @@ void LLSidepanelTaskInfo::updateVerbs()
*/
mOpenBtn->setEnabled(enable_object_open());
+ mPayBtn->setEnabled(enable_pay_object());
+ mBuyBtn->setEnabled(enable_buy_object());
}
void LLSidepanelTaskInfo::onOpenButtonClicked()
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
index 7b88fca7c3..56d4528a40 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
@@ -54,7 +54,7 @@
parameter="rename" />
</menu_item_call>
<menu_item_call
- label="Remove"
+ label="Remove Link"
layout="topleft"
name="remove_link">
<on_click
@@ -65,7 +65,7 @@
parameter="remove_link" />
</menu_item_call>
<menu_item_call
- label="Delete"
+ label="Delete Outfit"
layout="topleft"
name="delete">
<on_click
@@ -73,6 +73,6 @@
parameter="delete" />
<on_enable
function="panel_outfits_inventory_gear_default.Enable"
- parameter="delete" />
+ parameter="delete_outfit" />
</menu_item_call>
</menu>