FIRE-8804: Prevent opening inventory from using share in radar context menu

master
Ansariel 2013-04-22 12:03:02 +02:00
parent f238ec7c43
commit a75bbcbc8f
6 changed files with 32 additions and 0 deletions

View File

@ -40,6 +40,7 @@
#include "llavataractions.h"
#include "llcallingcard.h" // for LLAvatarTracker
#include "llviewermenu.h" // for gMenuHolder
#include "rlvhandler.h"
namespace FSFloaterRadarMenu
{
@ -203,6 +204,10 @@ bool FSRadarMenu::enableContextMenuItem(const LLSD& userdata)
// return LLAvatarActions::canOfferTeleport(mUUIDs);
//}
// </FS>
else if (item == std::string("can_open_inventory"))
{
return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
}
return false;
}

View File

@ -558,6 +558,13 @@ void LLAvatarActions::csr(const LLUUID& id, std::string name)
//static
void LLAvatarActions::share(const LLUUID& id)
{
// <FS:Ansariel> FIRE-8804: Prevent opening inventory from using share in radar context menu
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV))
{
return;
}
// </FS:Ansariel>
LLSD key;
LLFloaterSidePanelContainer::showPanel("inventory", key);

View File

@ -38,6 +38,7 @@
#include "llavataractions.h"
#include "llcallingcard.h" // for LLAvatarTracker
#include "llviewermenu.h" // for gMenuHolder
#include "rlvhandler.h"
namespace LLPanelPeopleMenus
{
@ -177,6 +178,12 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
// return LLAvatarActions::canOfferTeleport(mUUIDs);
//}
// </FS>
// <FS:Ansariel> FIRE-8804: Prevent opening inventory from using share in radar context menu
else if (item == std::string("can_open_inventory"))
{
return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
}
// </FS:Ansariel>
return false;
}

View File

@ -254,10 +254,17 @@ void RlvUIEnabler::onToggleShowInv(bool fQuitting)
//
// Filter (or stop filtering) opening new inventory floaters
//
// <FS:Ansariel> Modified for FIRE-8804
if (!fEnable)
{
addGenericFloaterFilter("inventory");
addGenericFloaterFilter("secondary_inventory");
}
else
{
removeGenericFloaterFilter("inventory");
removeGenericFloaterFilter("secondary_inventory");
}
}
// Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f

View File

@ -69,6 +69,9 @@
name="Share">
<menu_item_call.on_click
function="Avatar.Share" />
<menu_item_call.on_enable
function="Avatar.EnableItem"
parameter="can_open_inventory" />
</menu_item_call>
<menu_item_call
label="Pay"

View File

@ -62,6 +62,9 @@
name="Share">
<menu_item_call.on_click
function="Avatar.Share" />
<menu_item_call.on_enable
function="Avatar.EnableItem"
parameter="can_open_inventory" />
</menu_item_call>
<menu_item_call
label="Pay"