diff options
author | Vladimir Pchelko <pchelko@productengine.com> | 2010-07-02 17:17:19 +0300 |
---|---|---|
committer | Vladimir Pchelko <pchelko@productengine.com> | 2010-07-02 17:17:19 +0300 |
commit | 7c413593f46dedaca23cac17bf761d8246c842f9 (patch) | |
tree | 3959325f828841ab5e9b90721e66a8f5fd439b0b /indra | |
parent | 9f4dc3adf413f76346cc2c64392671d3255d629b (diff) |
EXT-7473 FIXED ("Share" button was added to "gear" menu in Inventory SP.)
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/678/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml | 11 |
3 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 9eece81861..7412812c62 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -53,6 +53,8 @@ #include "lltooldraganddrop.h" #include "llviewermenu.h" #include "llviewertexturelist.h" +#include "llsidepanelinventory.h" +#include "llsidetray.h" const std::string FILTERS_FILENAME("filters.xml"); @@ -1158,6 +1160,12 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) return FALSE; } + if (command_name == "share") + { + LLSidepanelInventory* parent = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + return parent ? parent->canShare() : FALSE; + } + return TRUE; } diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 951fdd630c..f2f2509f9a 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -58,6 +58,9 @@ public: void showTaskInfoPanel(); void showInventoryPanel(); + // checks can share selected item(s) + bool canShare(); + protected: // Tracks highlighted (selected) item in inventory panel. LLInventoryItem *getSelectedItem(); @@ -65,8 +68,6 @@ protected: void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); // "wear", "teleport", etc. void performActionOnSelection(const std::string &action); - bool canShare(); - void updateVerbs(); // diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index 62365f7cc2..c394700081 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -81,6 +81,17 @@ function="Inventory.GearDefault.Enable" parameter="save_texture" /> </menu_item_call> + <menu_item_call + label="Share" + layout="topleft" + name="Share" + visible="true"> + <on_click + function="Inventory.Share" /> + <on_enable + function="Inventory.GearDefault.Enable" + parameter="share" /> + </menu_item_call> <menu_item_call label="Find Original" layout="topleft" |