Skip to content
Snippets Groups Projects
Commit edcf44ad authored by Vladimir Pchelko's avatar Vladimir Pchelko
Browse files

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
parent 4081f6f5
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,8 @@ ...@@ -53,6 +53,8 @@
#include "lltooldraganddrop.h" #include "lltooldraganddrop.h"
#include "llviewermenu.h" #include "llviewermenu.h"
#include "llviewertexturelist.h" #include "llviewertexturelist.h"
#include "llsidepanelinventory.h"
#include "llsidetray.h"
const std::string FILTERS_FILENAME("filters.xml"); const std::string FILTERS_FILENAME("filters.xml");
...@@ -1158,6 +1160,12 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) ...@@ -1158,6 +1160,12 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
return FALSE; return FALSE;
} }
if (command_name == "share")
{
LLSidepanelInventory* parent = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
return parent ? parent->canShare() : FALSE;
}
return TRUE; return TRUE;
} }
......
...@@ -58,6 +58,9 @@ class LLSidepanelInventory : public LLPanel ...@@ -58,6 +58,9 @@ class LLSidepanelInventory : public LLPanel
void showTaskInfoPanel(); void showTaskInfoPanel();
void showInventoryPanel(); void showInventoryPanel();
// checks can share selected item(s)
bool canShare();
protected: protected:
// Tracks highlighted (selected) item in inventory panel. // Tracks highlighted (selected) item in inventory panel.
LLInventoryItem *getSelectedItem(); LLInventoryItem *getSelectedItem();
...@@ -65,8 +68,6 @@ class LLSidepanelInventory : public LLPanel ...@@ -65,8 +68,6 @@ class LLSidepanelInventory : public LLPanel
void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
// "wear", "teleport", etc. // "wear", "teleport", etc.
void performActionOnSelection(const std::string &action); void performActionOnSelection(const std::string &action);
bool canShare();
void updateVerbs(); void updateVerbs();
// //
......
...@@ -81,6 +81,17 @@ ...@@ -81,6 +81,17 @@
function="Inventory.GearDefault.Enable" function="Inventory.GearDefault.Enable"
parameter="save_texture" /> parameter="save_texture" />
</menu_item_call> </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 <menu_item_call
label="Find Original" label="Find Original"
layout="topleft" layout="topleft"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment