Merge remote-tracking branch 'lirusaito/master'
This commit is contained in:
@@ -63,7 +63,6 @@
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloaterabout.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloateravatartextures.h"
|
||||
#include "llfloaterbeacons.h"
|
||||
@@ -79,12 +78,9 @@
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloatereditui.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloaterfriends.h"
|
||||
#include "llfloaterfonttest.h"
|
||||
#include "llfloatergesture.h"
|
||||
#include "llfloatergodtools.h"
|
||||
#include "llfloatergroupinvite.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloaterhtmlcurrency.h"
|
||||
#include "llfloatermediabrowser.h" // gViewerHtmlHelp
|
||||
#include "llfloaterhud.h"
|
||||
@@ -120,6 +116,7 @@
|
||||
#include "llfloatermemleak.h"
|
||||
#include "llframestats.h"
|
||||
#include "llgivemoney.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llgroupmgr.h"
|
||||
#include "llhoverview.h"
|
||||
#include "llhudeffecttrail.h"
|
||||
@@ -3773,11 +3770,6 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat,
|
||||
}
|
||||
*/
|
||||
|
||||
BOOL is_agent_friend(const LLUUID& agent_id)
|
||||
{
|
||||
return (LLAvatarTracker::instance().getBuddyInfo(agent_id) != NULL);
|
||||
}
|
||||
|
||||
BOOL is_agent_mappable(const LLUUID& agent_id)
|
||||
{
|
||||
const LLRelationship* buddy_info = LLAvatarTracker::instance().getBuddyInfo(agent_id);
|
||||
@@ -3795,9 +3787,9 @@ class LLAvatarEnableAddFriend : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
|
||||
// bool new_value = avatar && !is_agent_friend(avatar->getID());
|
||||
// bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID());
|
||||
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
|
||||
bool new_value = avatar && !is_agent_friend(avatar->getID()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
// [/RLVa:KB]
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||
return true;
|
||||
@@ -3819,7 +3811,7 @@ void request_friendship(const LLUUID& dest_id)
|
||||
}
|
||||
if (!full_name.empty())
|
||||
{
|
||||
LLPanelFriends::requestFriendshipDialog(dest_id, full_name);
|
||||
LLAvatarActions::requestFriendshipDialog(dest_id, full_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6099,30 +6091,6 @@ void handle_look_at_selection(const LLSD& param)
|
||||
}
|
||||
}
|
||||
|
||||
void callback_invite_to_group(LLUUID group_id, void *user_data)
|
||||
{
|
||||
std::vector<LLUUID> agent_ids;
|
||||
agent_ids.push_back(*(LLUUID *)user_data);
|
||||
|
||||
LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
|
||||
}
|
||||
|
||||
void invite_to_group(const LLUUID& dest_id)
|
||||
{
|
||||
LLViewerObject* dest = gObjectList.findObject(dest_id);
|
||||
if(dest && dest->isAvatar())
|
||||
{
|
||||
LLFloaterGroupPicker* widget;
|
||||
widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
|
||||
if (widget)
|
||||
{
|
||||
widget->center();
|
||||
widget->setPowersMask(GP_MEMBER_INVITE);
|
||||
widget->setSelectCallback(callback_invite_to_group, (void *)&dest_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class LLAvatarInviteToGroup : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -6133,7 +6101,7 @@ class LLAvatarInviteToGroup : public view_listener_t
|
||||
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
invite_to_group(avatar->getID());
|
||||
LLAvatarActions::inviteToGroup(avatar->getID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -6144,9 +6112,9 @@ class LLAvatarAddFriend : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
|
||||
// if(avatar && !is_agent_friend(avatar->getID()))
|
||||
// if(avatar && !LLAvatarActions::isFriend(avatar->getID()))
|
||||
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
|
||||
if ( (avatar && !is_agent_friend(avatar->getID())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
|
||||
if ( (avatar && !LLAvatarActions::isFriend(avatar->getID())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
request_friendship(avatar->getID());
|
||||
@@ -6628,7 +6596,7 @@ class LLShowAgentProfile : public view_listener_t
|
||||
if ( (avatar) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gAgent.getID() == agent_id)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
LLFloaterAvatarInfo::show(avatar->getID());
|
||||
LLAvatarActions::showProfile(avatar->getID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -7279,28 +7247,12 @@ class LLAvatarSendIM : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | OK
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// if(avatar)
|
||||
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
|
||||
if ((avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)))
|
||||
// [/RLVa:KB]
|
||||
if(avatar)
|
||||
{
|
||||
std::string name("IM");
|
||||
LLNameValue *first = avatar->getNVPair("FirstName");
|
||||
LLNameValue *last = avatar->getNVPair("LastName");
|
||||
if (first && last)
|
||||
{
|
||||
name.assign( first->getString() );
|
||||
name.append(" ");
|
||||
name.append( last->getString() );
|
||||
}
|
||||
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
//EInstantMessage type = have_agent_callingcard(gLastHitObjectID)
|
||||
// ? IM_SESSION_ADD : IM_SESSION_CARDLESS_START;
|
||||
gIMMgr->addSession(LLCacheName::cleanFullName(name),IM_NOTHING_SPECIAL,avatar->getID());
|
||||
LLAvatarActions::startIM(avatar->getID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user