diff options
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 59f70ea1bd..b9775cf0e9 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -62,7 +62,9 @@ #include "llavataractions.h" #include "llgesturemgr.h" #include "lliconctrl.h" +#include "llinventoryfunctions.h" #include "llinventorymodel.h" +#include "llinventorypanel.h" #include "llinventoryclipboard.h" #include "lllineeditor.h" #include "llmenugl.h" @@ -275,7 +277,11 @@ void LLInvFVBridge::cutToClipboard() // *TODO: make sure this does the right thing void LLInvFVBridge::showProperties() { - LLFloaterReg::showInstance("properties", mUUID); + LLSD key; + key["id"] = mUUID; + LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); + + // LLFloaterReg::showInstance("properties", mUUID); } void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch) @@ -506,7 +512,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const return TRUE; } -void hideContextEntries(LLMenuGL& menu, +void hide_context_entries(LLMenuGL& menu, const std::vector<std::string> &entries_to_show, const std::vector<std::string> &disabled_entries) { @@ -521,7 +527,7 @@ void hideContextEntries(LLMenuGL& menu, LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(*itor); if ((name == "More") && branchp) { - hideContextEntries(*branchp->getBranch(), entries_to_show, disabled_entries); + hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries); } @@ -598,6 +604,12 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, { disabled_items.push_back(std::string("Delete")); } + + // If multiple items are selected, disable properties (if it exists). + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Properties")); + } } void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -621,7 +633,7 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } // *TODO: remove this @@ -2387,7 +2399,7 @@ void LLFolderBridge::folderOptionsMenu() } mItems.push_back(std::string("Take Off Items")); } - hideContextEntries(*mMenu, mItems, disabled_items); + hide_context_entries(*mMenu, mItems, disabled_items); } BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type) @@ -2526,7 +2538,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mItems.push_back(std::string("--no options--")); mDisabledItems.push_back(std::string("--no options--")); } - hideContextEntries(menu, mItems, mDisabledItems); + hide_context_entries(menu, mItems, mDisabledItems); } BOOL LLFolderBridge::hasChildren() const @@ -3147,7 +3159,7 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Sound Separator")); items.push_back(std::string("Sound Play")); - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } // +=================================================+ @@ -3204,7 +3216,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("About Landmark")); } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } // Convenience function for the two functions below. @@ -3433,7 +3445,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Conference Chat")); } } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, @@ -3662,7 +3674,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Activate")); items.push_back(std::string("Deactivate")); } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } // +=================================================+ @@ -3702,7 +3714,7 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Animation Play")); items.push_back(std::string("Animation Audition")); - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } @@ -3847,6 +3859,10 @@ void LLObjectBridge::openItem() LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } + LLSD key; + key["id"] = mUUID; + LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); + /* LLFloaterReg::showInstance("properties", mUUID); */ @@ -4058,7 +4074,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } BOOL LLObjectBridge::renameItem(const std::string& new_name) @@ -4471,7 +4487,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } // Called from menus @@ -5043,7 +5059,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Delete")); } } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } @@ -5094,7 +5110,7 @@ void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Delete")); } } - hideContextEntries(menu, items, disabled_items); + hide_context_entries(menu, items, disabled_items); } void LLLinkFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) |