diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index 1ae229ea0a..05c797a75d 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -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()); } diff --git a/indra/newview/fsfloatercontacts.cpp b/indra/newview/fsfloatercontacts.cpp index 53ea722856..ba91a8ebb6 100644 --- a/indra/newview/fsfloatercontacts.cpp +++ b/indra/newview/fsfloatercontacts.cpp @@ -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("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(); } diff --git a/indra/newview/fsnearbychathub.cpp b/indra/newview/fsnearbychathub.cpp index fa08908cf5..3a49944f36 100644 --- a/indra/newview/fsnearbychathub.cpp +++ b/indra/newview/fsnearbychathub.cpp @@ -613,8 +613,7 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 * static LLCachedControl 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) diff --git a/indra/newview/fsradarmenu.cpp b/indra/newview/fsradarmenu.cpp index 0e1784ae6d..5fbd3e3f6c 100644 --- a/indra/newview/fsradarmenu.cpp +++ b/indra/newview/fsradarmenu.cpp @@ -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; } diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 1d0df95490..624eddcf92 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -63,6 +63,7 @@ #include "lltoggleablemenu.h" #include "lluictrl.h" #include "llviewerregion.h" +#include "rlvactions.h" // 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)); // @@ -859,6 +862,11 @@ bool LLInspectAvatar::enableTeleportRequest() return LLAvatarActions::canRequestTeleport(mAvatarID); } +bool LLInspectAvatar::enablePay() +{ + return RlvActions::canPayAvatar(mAvatarID); +} + bool LLInspectAvatar::godModeEnabled() { return gAgent.isGodlike(); diff --git a/indra/newview/skins/default/xui/en/menu_fs_radar.xml b/indra/newview/skins/default/xui/en/menu_fs_radar.xml index e0c68135e4..08ce090e85 100644 --- a/indra/newview/skins/default/xui/en/menu_fs_radar.xml +++ b/indra/newview/skins/default/xui/en/menu_fs_radar.xml @@ -137,6 +137,9 @@ name="Pay"> + - + +