diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-01-06 16:19:30 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-01-06 16:19:30 -0500 |
commit | 327069dcb8d71e2fb603c0ddf505d692de64e461 (patch) | |
tree | a39d7c61820f98d176d8fb2136eb7a898f840412 /indra/newview | |
parent | 703694d1da6c413947657f43c1e61f7065b5101f (diff) | |
parent | 7586d8fcfde811cb04fb1c95aa0aa235b8df6aff (diff) |
merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinspectobject.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.h | 1 | ||||
-rw-r--r-- | indra/newview/llsidepaneltaskinfo.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml | 6 |
6 files changed, 51 insertions, 15 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index cb35a287e9..b3bac0453a 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -41,6 +41,7 @@ #include "llslurl.h" #include "llviewermenu.h" // handle_object_touch(), handle_buy() #include "llviewermedia.h" +#include "llviewermediafocus.h" #include "llviewerobjectlist.h" // to select the requested object // Linden libraries @@ -214,6 +215,10 @@ void LLInspectObject::onOpen(const LLSD& data) LLViewerObject* obj = gObjectList.findObject( mObjectID ); if (obj) { + // Media focus and this code fight over the select manager. + // Make sure any media is unfocused before changing the selection here. + LLViewerMediaFocus::getInstance()->clearFocus(); + LLSelectMgr::instance().deselectAll(); mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 41745e4994..29fa4b319c 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -313,6 +313,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) @@ -354,20 +356,22 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) { onClipboardAction("delete"); } + updateListCommands(); + updateVerbs(); } BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) { const std::string command_name = userdata.asString(); - if (command_name == "delete") + if (command_name == "delete" || command_name == "remove") { BOOL can_delete = FALSE; 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) @@ -386,9 +390,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) @@ -402,6 +406,12 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) } return FALSE; } + if (command_name == "rename" || + command_name == "delete_outfit") + { + return (getCorrectListenerForAction() != NULL) && hasItemsSelected(); + } + if (command_name == "wear" || command_name == "make_outfit") { @@ -413,9 +423,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "edit" || - command_name == "wear" || - command_name == "add" || - command_name == "remove" + command_name == "add" ) { return (getCorrectListenerForAction() != NULL); @@ -423,6 +431,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 e4279b7396..b117311775 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -115,6 +115,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/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 6e11788e0a..7e8c8eb92e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -170,12 +170,15 @@ public: // accept this and go past it in the MIME type probe // 302 means the resource can be found temporarily in a different place - added this for join.secondlife.com // 499 is a code specifc to join.secondlife.com (????) apparently safe to ignore - if( ((status >= 200) && (status < 300)) || - ((status >= 400) && (status < 499)) || - (status == 500) || - (status == 302) || - (status == 499) - ) +// if( ((status >= 200) && (status < 300)) || +// ((status >= 400) && (status < 499)) || +// (status == 500) || +// (status == 302) || +// (status == 499) +// ) + // We now no longer check the error code returned from the probe. + // If we have a mime type, use it. If not, default to the web plugin and let it handle error reporting. + if(1) { // The probe was successful. if(mime_type.empty()) 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 221e3f997b..2c7a51f0e7 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 @@ -43,7 +43,7 @@ parameter="rename" /> </menu_item_call> <menu_item_call - label="Remove" + label="Remove Link" layout="topleft" name="remove_link"> <on_click @@ -54,7 +54,7 @@ parameter="remove_link" /> </menu_item_call> <menu_item_call - label="Delete" + label="Delete Outfit" layout="topleft" name="delete"> <on_click @@ -62,6 +62,6 @@ parameter="delete" /> <on_enable function="panel_outfits_inventory_gear_default.Enable" - parameter="delete" /> + parameter="delete_outfit" /> </menu_item_call> </menu> |