Make the RLVa changes actually have an effect...
parent
a0ba493848
commit
0c55380882
|
|
@ -72,6 +72,7 @@
|
|||
#include "llfocusmgr.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "llpanelblockedlist.h"
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
#include "rlvhandler.h"
|
||||
|
||||
|
|
@ -508,7 +509,12 @@ public:
|
|||
{
|
||||
return canModerate(userdata);
|
||||
}
|
||||
else if (param == "can_ban_member")
|
||||
// [RLVa:KB] - @pay
|
||||
else if (param == "can_pay")
|
||||
{
|
||||
return RlvActions::canPayAvatar(getAvatarId());
|
||||
}
|
||||
// [/RLVa:KB] else if (param == "can_ban_member")
|
||||
{
|
||||
return canBanGroupMember(getAvatarId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@
|
|||
#include "lltooldraganddrop.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llvoiceclient.h"
|
||||
// [RLVa:KB] - @pay
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//Maximum number of people you can select to do an operation on at once.
|
||||
const U32 MAX_FRIEND_SELECT = 20;
|
||||
|
|
@ -840,7 +843,6 @@ void FSFloaterContacts::refreshUI()
|
|||
|
||||
//Options that can only be performed with one friend selected
|
||||
childSetEnabled("profile_btn", single_selected && !multiple_selected);
|
||||
childSetEnabled("pay_btn", single_selected && !multiple_selected);
|
||||
|
||||
//Options that can be performed with up to MAX_FRIEND_SELECT friends selected
|
||||
//(single_selected will always be true in this situations)
|
||||
|
|
@ -849,12 +851,15 @@ void FSFloaterContacts::refreshUI()
|
|||
|
||||
LLScrollListItem* selected_item = mFriendsList->getFirstSelected();
|
||||
bool mappable = false;
|
||||
bool payable = false;
|
||||
if (selected_item)
|
||||
{
|
||||
LLUUID av_id = selected_item->getUUID();
|
||||
mappable = (single_selected && !multiple_selected && av_id.notNull() && is_agent_mappable(av_id));
|
||||
payable = (single_selected && !multiple_selected && av_id.notNull() && RlvActions::canPayAvatar(av_id));
|
||||
}
|
||||
childSetEnabled("map_btn", mappable && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP));
|
||||
childSetEnabled("pay_btn", payable);
|
||||
|
||||
// Set friend count
|
||||
mFriendsTab->getChild<LLTextBox>("friend_count")->setTextArg("COUNT", llformat("%d", mFriendsList->getItemCount()));
|
||||
|
|
@ -1088,7 +1093,8 @@ void FSFloaterContacts::childShowTab(const std::string& id, const std::string& t
|
|||
void FSFloaterContacts::updateRlvRestrictions(ERlvBehaviour behavior)
|
||||
{
|
||||
if (behavior == RLV_BHVR_SHOWLOC ||
|
||||
behavior == RLV_BHVR_SHOWWORLDMAP)
|
||||
behavior == RLV_BHVR_SHOWWORLDMAP ||
|
||||
behavior == RLV_BHVR_PAY)
|
||||
{
|
||||
refreshUI();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -613,8 +613,7 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 *
|
|||
static LLCachedControl<bool> allow_mu_pose(gSavedSettings, "AllowMUpose");
|
||||
if (length > 0 &&
|
||||
((raw_text[0] != '/' || (type_during_emote && length > 3 && prefix == utf8string_to_wstring("/me") && (raw_text[3] == ' ' || raw_text[3] == '\'')))
|
||||
&& (raw_text[0] != ':' || !allow_mu_pose || type_during_emote)) &&
|
||||
!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT))
|
||||
&& (raw_text[0] != ':' || !allow_mu_pose || type_during_emote)))
|
||||
{
|
||||
// only start typing animation if we are chatting without / on channel 0 -Zi
|
||||
if (channel == 0)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "llcallingcard.h" // for LLAvatarTracker
|
||||
#include "llnetmap.h"
|
||||
#include "llviewermenu.h" // for gMenuHolder
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
|
||||
namespace FSFloaterRadarMenu
|
||||
|
|
@ -228,6 +229,11 @@ bool FSRadarMenu::enableContextMenuItem(const LLSD& userdata)
|
|||
{
|
||||
return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
|
||||
}
|
||||
else if (item == std::string("can_pay"))
|
||||
{
|
||||
const LLUUID& id = mUUIDs.front();
|
||||
return RlvActions::canPayAvatar(id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
#include "lltoggleablemenu.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "rlvactions.h"
|
||||
// </FS:Ansariel>
|
||||
|
||||
class LLFetchAvatarData;
|
||||
|
|
@ -152,6 +153,7 @@ private:
|
|||
bool enableUnmute();
|
||||
bool enableTeleportOffer();
|
||||
bool enableTeleportRequest();
|
||||
bool enablePay();
|
||||
bool godModeEnabled();
|
||||
|
||||
// Is used to determine if "Add friend" option should be enabled in gear menu
|
||||
|
|
@ -257,6 +259,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
|
|||
mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableCall", boost::bind(&LLAvatarActions::canCall));
|
||||
mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableTeleportOffer", boost::bind(&LLInspectAvatar::enableTeleportOffer, this));
|
||||
mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableTeleportRequest", boost::bind(&LLInspectAvatar::enableTeleportRequest, this));
|
||||
mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnablePay", boost::bind(&LLInspectAvatar::enablePay, this));
|
||||
mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this));
|
||||
mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this));
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -859,6 +862,11 @@ bool LLInspectAvatar::enableTeleportRequest()
|
|||
return LLAvatarActions::canRequestTeleport(mAvatarID);
|
||||
}
|
||||
|
||||
bool LLInspectAvatar::enablePay()
|
||||
{
|
||||
return RlvActions::canPayAvatar(mAvatarID);
|
||||
}
|
||||
|
||||
bool LLInspectAvatar::godModeEnabled()
|
||||
{
|
||||
return gAgent.isGodlike();
|
||||
|
|
|
|||
|
|
@ -137,6 +137,9 @@
|
|||
name="Pay">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.Pay" />
|
||||
<menu_item_call.on_enable
|
||||
function="Avatar.EnableItem"
|
||||
parameter="can_pay"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Offer Teleport"
|
||||
|
|
|
|||
|
|
@ -112,8 +112,11 @@
|
|||
label="Pay"
|
||||
layout="topleft"
|
||||
name="Pay">
|
||||
<on_click
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.Pay" />
|
||||
<menu_item_call.on_enable
|
||||
function="Avatar.EnableItem"
|
||||
parameter="can_pay"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Offer Teleport"
|
||||
|
|
|
|||
|
|
@ -149,6 +149,8 @@
|
|||
name="pay">
|
||||
<menu_item_call.on_click
|
||||
function="InspectAvatar.Pay"/>
|
||||
<menu_item_call.on_enable
|
||||
function="InspectAvatar.Gear.EnablePay"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Share"
|
||||
|
|
|
|||
Loading…
Reference in New Issue