Merge remote-tracking branch 'lirusaito/master'
This commit is contained in:
@@ -1074,7 +1074,8 @@ void LLFloater::setForeground(BOOL front)
|
||||
releaseFocus();
|
||||
}
|
||||
|
||||
setBackgroundOpaque( front );
|
||||
if (front || !LLUI::sConfigGroup->getBOOL("FloaterUnfocusedBackgroundOpaque")) // Singu Note: This can be removed when InactiveFloaterTransparency is added
|
||||
setBackgroundOpaque( front );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ set(viewer_SOURCE_FILES
|
||||
floatervoicelicense.cpp
|
||||
generichandlers.cpp
|
||||
hbfloatergrouptitles.cpp
|
||||
groupchatlistener.cpp
|
||||
hippofloaterxml.cpp
|
||||
hippogridmanager.cpp
|
||||
hippolimits.cpp
|
||||
@@ -119,6 +120,7 @@ set(viewer_SOURCE_FILES
|
||||
llassetuploadresponders.cpp
|
||||
llattachmentsmgr.cpp
|
||||
llaudiosourcevo.cpp
|
||||
llavataractions.cpp
|
||||
llavatarpropertiesprocessor.cpp
|
||||
llbox.cpp
|
||||
llcallbacklist.cpp
|
||||
@@ -272,6 +274,7 @@ set(viewer_SOURCE_FILES
|
||||
llgiveinventory.cpp
|
||||
llgivemoney.cpp
|
||||
llglsandbox.cpp
|
||||
llgroupactions.cpp
|
||||
llgroupmgr.cpp
|
||||
llgroupnotify.cpp
|
||||
llhomelocationresponder.cpp
|
||||
@@ -588,6 +591,7 @@ set(viewer_HEADER_FILES
|
||||
floaterlocalassetbrowse.h
|
||||
floatervoicelicense.h
|
||||
generichandlers.h
|
||||
groupchatlistener.h
|
||||
hbfloatergrouptitles.h
|
||||
hippofloaterxml.h
|
||||
hippogridmanager.h
|
||||
@@ -617,6 +621,7 @@ set(viewer_HEADER_FILES
|
||||
llassetuploadresponders.h
|
||||
llattachmentsmgr.h
|
||||
llaudiosourcevo.h
|
||||
llavataractions.h
|
||||
llavatarpropertiesprocessor.h
|
||||
llbox.h
|
||||
llcallbacklist.h
|
||||
@@ -770,6 +775,7 @@ set(viewer_HEADER_FILES
|
||||
llgesturemgr.h
|
||||
llgiveinventory.h
|
||||
llgivemoney.h
|
||||
llgroupactions.h
|
||||
llgroupmgr.h
|
||||
llgroupnotify.h
|
||||
llhomelocationresponder.h
|
||||
@@ -1056,7 +1062,6 @@ set(viewer_HEADER_FILES
|
||||
noise.h
|
||||
pipeline.h
|
||||
qtoolalign.h
|
||||
randgauss.h
|
||||
rlvcommon.h
|
||||
rlvdefines.h
|
||||
rlvextensions.h
|
||||
|
||||
@@ -729,6 +729,17 @@ Found in Advanced->Rendering->Info Displays</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FloaterUnfocusedBackgroundOpaque</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Disables floaters going transparent when not in focus, may conflict with some skins, though.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>InstantMessageLogPathAnyAccount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -191,6 +191,7 @@ void LLPrefsAscentVan::refreshValues()
|
||||
mTurnAround = gSavedSettings.getBOOL("TurnAroundWhenWalkingBackwards");
|
||||
mAnnounceSnapshots = gSavedSettings.getBOOL("AnnounceSnapshots");
|
||||
mAnnounceStreamMetadata = gSavedSettings.getBOOL("AnnounceStreamMetadata");
|
||||
mUnfocusedFloatersOpaque = gSavedSettings.getBOOL("FloaterUnfocusedBackgroundOpaque");
|
||||
|
||||
//Tags\Colors ----------------------------------------------------------------------------
|
||||
mAscentBroadcastTag = gSavedSettings.getBOOL("AscentBroadcastTag");
|
||||
@@ -259,6 +260,7 @@ void LLPrefsAscentVan::cancel()
|
||||
gSavedSettings.setBOOL("TurnAroundWhenWalkingBackwards", mTurnAround);
|
||||
gSavedSettings.setBOOL("AnnounceSnapshots", mAnnounceSnapshots);
|
||||
gSavedSettings.setBOOL("AnnounceStreamMetadata", mAnnounceStreamMetadata);
|
||||
gSavedSettings.setBOOL("FloaterUnfocusedBackgroundOpaque", mUnfocusedFloatersOpaque);
|
||||
|
||||
//Tags\Colors ----------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("AscentBroadcastTag", mAscentBroadcastTag);
|
||||
|
||||
@@ -62,6 +62,7 @@ protected:
|
||||
bool mTurnAround;
|
||||
bool mAnnounceSnapshots;
|
||||
bool mAnnounceStreamMetadata;
|
||||
bool mUnfocusedFloatersOpaque;
|
||||
//Tags\Colors
|
||||
BOOL mAscentBroadcastTag;
|
||||
std::string mReportClientUUID;
|
||||
|
||||
81
indra/newview/groupchatlistener.cpp
Normal file
81
indra/newview/groupchatlistener.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* @file groupchatlistener.cpp
|
||||
* @author Nat Goodspeed
|
||||
* @date 2011-04-11
|
||||
* @brief Implementation for groupchatlistener.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// Precompiled header
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
// associated header
|
||||
#include "groupchatlistener.h"
|
||||
// STL headers
|
||||
// std headers
|
||||
// external library headers
|
||||
// other Linden headers
|
||||
#include "llgroupactions.h"
|
||||
//#include "llimview.h"
|
||||
|
||||
|
||||
namespace {
|
||||
void startIm_wrapper(LLSD const & event)
|
||||
{
|
||||
LLUUID session_id = LLGroupActions::startIM(event["id"].asUUID());
|
||||
sendReply(LLSDMap("session_id", LLSD(session_id)), event);
|
||||
}
|
||||
|
||||
/* Singu TODO
|
||||
void send_message_wrapper(const std::string& text, const LLUUID& session_id, const LLUUID& group_id)
|
||||
{
|
||||
LLIMModel::sendMessage(text, session_id, group_id, IM_SESSION_GROUP_START);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
GroupChatListener::GroupChatListener():
|
||||
LLEventAPI("GroupChat",
|
||||
"API to enter, leave, send and intercept group chat messages")
|
||||
{
|
||||
add("startIM",
|
||||
"Enter a group chat in group with UUID [\"id\"]\n"
|
||||
"Assumes the logged-in agent is already a member of this group.",
|
||||
&startIm_wrapper);
|
||||
add("endIM",
|
||||
"Leave a group chat in group with UUID [\"id\"]\n"
|
||||
"Assumes a prior successful startIM request.",
|
||||
&LLGroupActions::endIM,
|
||||
LLSDArray("id"));
|
||||
/* Singu TODO
|
||||
add("sendIM",
|
||||
"send a groupchat IM",
|
||||
&send_message_wrapper,
|
||||
LLSDArray("text")("session_id")("group_id"));
|
||||
*/
|
||||
}
|
||||
/*
|
||||
static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id,
|
||||
const LLUUID& other_participant_id, EInstantMessage dialog);
|
||||
*/
|
||||
|
||||
41
indra/newview/groupchatlistener.h
Normal file
41
indra/newview/groupchatlistener.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @file groupchatlistener.h
|
||||
* @author Nat Goodspeed
|
||||
* @date 2011-04-11
|
||||
* @brief
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#if ! defined(LL_GROUPCHATLISTENER_H)
|
||||
#define LL_GROUPCHATLISTENER_H
|
||||
|
||||
#include "lleventapi.h"
|
||||
|
||||
class GroupChatListener: public LLEventAPI
|
||||
{
|
||||
public:
|
||||
GroupChatListener();
|
||||
};
|
||||
|
||||
#endif /* ! defined(LL_GROUPCHATLISTENER_H) */
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "hbfloatergrouptitles.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
@@ -145,13 +146,7 @@ void HBFloaterGroupTitles::onActivate(void* userdata)
|
||||
LLUUID group_id = item->getColumn(LIST_GROUP_ID)->getValue().asUUID();
|
||||
if (group_id != old_group_id)
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_ActivateGroup);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_GroupID, group_id);
|
||||
gAgent.sendReliableMessage();
|
||||
LLGroupActions::activate(group_id);
|
||||
}
|
||||
|
||||
// Set the title
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloatercamera.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llgroupmgr.h"
|
||||
#include "llhomelocationresponder.h"
|
||||
#include "llhudmanager.h"
|
||||
@@ -3247,7 +3248,7 @@ BOOL LLAgent::downGrabbed() const
|
||||
|
||||
void update_group_floaters(const LLUUID& group_id)
|
||||
{
|
||||
LLFloaterGroupInfo::refreshGroup(group_id);
|
||||
LLGroupActions::refresh(group_id);
|
||||
|
||||
// update avatar info
|
||||
LLFloaterAvatarInfo* fa = LLFloaterAvatarInfo::getInstance(gAgent.getID());
|
||||
@@ -3300,7 +3301,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **)
|
||||
|
||||
LLGroupMgr::getInstance()->clearGroupData(group_id);
|
||||
// close the floater for this group, if any.
|
||||
LLFloaterGroupInfo::closeGroup(group_id);
|
||||
LLGroupActions::closeGroup(group_id);
|
||||
// refresh the group panel of the search window, if necessary.
|
||||
LLFloaterDirectory::refreshGroup(group_id);
|
||||
}
|
||||
@@ -3379,7 +3380,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
|
||||
|
||||
LLGroupMgr::getInstance()->clearGroupData(group_id);
|
||||
// close the floater for this group, if any.
|
||||
LLFloaterGroupInfo::closeGroup(group_id);
|
||||
LLGroupActions::closeGroup(group_id);
|
||||
// refresh the group panel of the search window,
|
||||
//if necessary.
|
||||
LLFloaterDirectory::refreshGroup(group_id);
|
||||
|
||||
734
indra/newview/llavataractions.cpp
Normal file
734
indra/newview/llavataractions.cpp
Normal file
@@ -0,0 +1,734 @@
|
||||
/**
|
||||
* @file llavataractions.cpp
|
||||
* @brief Friend-related actions (add, remove, offer teleport, etc)
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llavataractions.h"
|
||||
|
||||
#include "llavatarnamecache.h" // IDEVO
|
||||
#include "llnotificationsutil.h" // for LLNotificationsUtil
|
||||
#include "roles_constants.h" // for GP_MEMBER_INVITE
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llcallingcard.h" // LLAvatarTracker
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloatergroupinvite.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llgivemoney.h"
|
||||
#include "llimview.h" // for gIMMgr
|
||||
#include "llinventoryobserver.h"
|
||||
#include "llmutelist.h"
|
||||
#include "lltrans.h"
|
||||
#include "llvoiceclient.h"
|
||||
#include "llweb.h"
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
extern const S32 TRANS_GIFT;
|
||||
void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group = FALSE, S32 trx_type = TRANS_GIFT, const std::string& desc = LLStringUtil::null);
|
||||
void handle_lure(const uuid_vec_t& ids);
|
||||
void send_improved_im(const LLUUID& to_id, const std::string& name, const std::string& message, U8 offline, EInstantMessage dialog, const LLUUID& id, U32 timestamp = NO_TIMESTAMP, const U8* binary_bucket = (U8*)EMPTY_BINARY_BUCKET, S32 binary_bucket_size = EMPTY_BINARY_BUCKET_SIZE);
|
||||
|
||||
// static
|
||||
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
|
||||
{
|
||||
if(id == gAgentID)
|
||||
{
|
||||
LLNotificationsUtil::add("AddSelfFriend");
|
||||
return;
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
args["NAME"] = name;
|
||||
LLSD payload;
|
||||
payload["id"] = id;
|
||||
payload["name"] = name;
|
||||
|
||||
LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
|
||||
}
|
||||
|
||||
void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name)
|
||||
{
|
||||
LLAvatarActions::requestFriendshipDialog(id, av_name.getCompleteName());
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id)
|
||||
{
|
||||
if(id.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_friendship, _1, _2));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::removeFriendDialog(const LLUUID& id)
|
||||
{
|
||||
if (id.isNull())
|
||||
return;
|
||||
|
||||
uuid_vec_t ids;
|
||||
ids.push_back(id);
|
||||
removeFriendsDialog(ids);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
|
||||
{
|
||||
if(ids.size() == 0)
|
||||
return;
|
||||
|
||||
LLSD args;
|
||||
std::string msgType;
|
||||
if(ids.size() == 1)
|
||||
{
|
||||
LLUUID agent_id = ids[0];
|
||||
std::string av_name;
|
||||
if(LLAvatarNameCache::getPNSName(agent_id, av_name))
|
||||
{
|
||||
args["NAME"] = av_name;
|
||||
}
|
||||
|
||||
msgType = "RemoveFromFriends";
|
||||
}
|
||||
else
|
||||
{
|
||||
msgType = "RemoveMultipleFromFriends";
|
||||
}
|
||||
|
||||
LLSD payload;
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
payload["ids"].append(*it);
|
||||
}
|
||||
|
||||
LLNotificationsUtil::add(msgType,
|
||||
args,
|
||||
payload,
|
||||
&handleRemove);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::offerTeleport(const LLUUID& invitee)
|
||||
{
|
||||
if (invitee.isNull())
|
||||
return;
|
||||
|
||||
LLDynamicArray<LLUUID> ids;
|
||||
ids.push_back(invitee);
|
||||
offerTeleport(ids);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::offerTeleport(const uuid_vec_t& ids)
|
||||
{
|
||||
if (ids.size() == 0)
|
||||
return;
|
||||
|
||||
handle_lure(ids);
|
||||
}
|
||||
|
||||
static void on_avatar_name_cache_start_im(const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
|
||||
if (!tear_off) gIMMgr->setFloaterOpen(true);
|
||||
gIMMgr->addSession(LLCacheName::cleanFullName(av_name.getLegacyName()), IM_NOTHING_SPECIAL, agent_id);
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::startIM(const LLUUID& id)
|
||||
{
|
||||
if (id.isNull() || gAgentID == id)
|
||||
return;
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(id)) )
|
||||
{
|
||||
LLUUID idSession = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
|
||||
if ( (idSession.notNull()) && (!gIMMgr->hasSession(idSession)) )
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", id/*LLSLURL("agent", id, "completename").getSLURLString()*/));
|
||||
return;
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(id, &av_name)) // Bypass expiration, open NOW!
|
||||
on_avatar_name_cache_start_im(id, av_name);
|
||||
else
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::endIM(const LLUUID& id)
|
||||
{
|
||||
if (id.isNull())
|
||||
return;
|
||||
|
||||
LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
|
||||
if (session_id.notNull())
|
||||
{
|
||||
gIMMgr->removeSession(session_id);
|
||||
}
|
||||
}
|
||||
|
||||
/* Singu TODO: Voice refactor
|
||||
static void on_avatar_name_cache_start_call(const LLUUID& agent_id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
LLUUID session_id = gIMMgr->addSession(LLCacheName::cleanFullName(av_name.getLegacyName()), IM_NOTHING_SPECIAL, agent_id, true);
|
||||
if (session_id.notNull())
|
||||
{
|
||||
gIMMgr->startCall(session_id);
|
||||
}
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLAvatarActions::startCall(const LLUUID& id)
|
||||
{
|
||||
if (id.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(id)) )
|
||||
{
|
||||
LLUUID idSession = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
|
||||
if ( (idSession.notNull()) && (!gIMMgr->hasSession(idSession)) )
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", id));//LLSLURL("agent", id, "completename").getSLURLString()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLAvatarNameCache::get(id,
|
||||
boost::bind(&on_avatar_name_cache_start_call, _1, _2));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids)
|
||||
{
|
||||
if (ids.size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// convert vector into LLDynamicArray for addSession
|
||||
LLDynamicArray<LLUUID> id_array;
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
const LLUUID& idAgent = *it;
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(idAgent)) )
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF, LLSD().with("RECIPIENT", idAgent));//LLSLURL("agent", idAgent, "completename").getSLURLString()));
|
||||
return;
|
||||
}
|
||||
id_array.push_back(idAgent);
|
||||
// [/RLVa:KB]
|
||||
// id_array.push_back(*it);
|
||||
}
|
||||
|
||||
// create the new ad hoc voice session
|
||||
const std::string title = LLTrans::getString("conference-title");
|
||||
LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START,
|
||||
ids[0], id_array, true);
|
||||
if (session_id.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gIMMgr->autoStartCallOnStartup(session_id);
|
||||
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
*/
|
||||
|
||||
/* AD *TODO: Is this function needed any more?
|
||||
I fixed it a bit(added check for canCall), but it appears that it is not used
|
||||
anywhere. Maybe it should be removed?
|
||||
// static
|
||||
bool LLAvatarActions::isCalling(const LLUUID &id)
|
||||
{
|
||||
if (id.isNull() || !canCall())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
|
||||
return (LLIMModel::getInstance()->findIMSession(session_id) != NULL);
|
||||
}*/
|
||||
|
||||
//static
|
||||
bool LLAvatarActions::canCall()
|
||||
{
|
||||
return LLVoiceClient::getInstance()->voiceEnabled() /*&& LLVoiceClient::getInstance()->isVoiceWorking()*/;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::startConference(const uuid_vec_t& ids)
|
||||
{
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
const LLUUID& idAgent = *it;
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(idAgent)) )
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF, LLSD().with("RECIPIENT", idAgent/*LLSLURL("agent", idAgent, "completename").getSLURLString()*/));
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
|
||||
if (!tear_off) gIMMgr->setFloaterOpen(true);
|
||||
const std::string title = LLTrans::getString("conference-title");
|
||||
gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], ids);
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
|
||||
/* Singu TODO: Web Profiles
|
||||
static const char* get_profile_floater_name(const LLUUID& avatar_id)
|
||||
{
|
||||
// Use different floater XML for our profile to be able to save its rect.
|
||||
return avatar_id == gAgentID ? "my_profile" : "profile";
|
||||
}
|
||||
*/
|
||||
|
||||
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
//if (!gSavedSettings.getBOOL("UseWebProfiles")
|
||||
//{
|
||||
LLFloaterAvatarInfo* floater = LLFloaterAvatarInfo::getInstance(agent_id);
|
||||
if(!floater)
|
||||
{
|
||||
floater = new LLFloaterAvatarInfo(LLTrans::getString("Command_Profile_Label")+" "+av_name.getCompleteName(), agent_id);
|
||||
floater->center();
|
||||
}
|
||||
|
||||
// ...bring that window to front
|
||||
floater->open(); /*Flawfinder: ignore*/
|
||||
//}
|
||||
/*
|
||||
else
|
||||
{
|
||||
std::string username = av_name.mUsername;
|
||||
if (username.empty())
|
||||
{
|
||||
username = LLCacheName::buildUsername(av_name.mDisplayName);
|
||||
}
|
||||
|
||||
llinfos << "opening web profile for " << username << llendl;
|
||||
std::string url = getProfileURL(username);
|
||||
|
||||
// PROFILES: open in webkit window
|
||||
LLFloaterWebContent::Params p;
|
||||
p.url(url).
|
||||
id(agent_id.asString());
|
||||
LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::showProfile(const LLUUID& id)
|
||||
{
|
||||
if (id.notNull())
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(id, &av_name)) // Bypass expiration, open NOW!
|
||||
on_avatar_name_show_profile(id, av_name);
|
||||
else
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_show_profile, _1, _2));
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
bool LLAvatarActions::profileVisible(const LLUUID& id)
|
||||
{
|
||||
LLFloater* browser = getProfileFloater(id);
|
||||
return browser && browser->getVisible();
|
||||
}
|
||||
|
||||
//static
|
||||
LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id)
|
||||
{
|
||||
LLFloater* browser;
|
||||
//if (!gSavedSettings.getBOOL("UseWebProfiles")
|
||||
browser = LLFloaterAvatarInfo::getInstance(id);
|
||||
/*else
|
||||
browser = dynamic_cast<LLFloaterWebContent*>
|
||||
(LLFloaterReg::findInstance(get_profile_floater_name(id), LLSD().with("id", id)));
|
||||
*/
|
||||
return browser;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLAvatarActions::hideProfile(const LLUUID& id)
|
||||
{
|
||||
LLFloater* browser = getProfileFloater(id);
|
||||
if (browser)
|
||||
{
|
||||
browser->close();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::showOnMap(const LLUUID& id)
|
||||
{
|
||||
std::string av_name;
|
||||
if (!LLAvatarNameCache::getPNSName(id, av_name))
|
||||
{
|
||||
LLAvatarNameCache::get(id, boost::bind(&LLAvatarActions::showOnMap, id));
|
||||
return;
|
||||
}
|
||||
|
||||
gFloaterWorldMap->trackAvatar(id, av_name);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::pay(const LLUUID& id)
|
||||
{
|
||||
LLNotification::Params params("BusyModePay");
|
||||
params.functor(boost::bind(&LLAvatarActions::handlePay, _1, _2, id));
|
||||
|
||||
if (gAgent.getBusy())
|
||||
{
|
||||
// warn users of being in busy mode during a transaction
|
||||
LLNotifications::instance().add(params);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotifications::instance().forceResponse(params, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::kick(const LLUUID& id)
|
||||
{
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = id;
|
||||
LLNotifications::instance().add("KickUser", LLSD(), payload, handleKick);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::freeze(const LLUUID& id)
|
||||
{
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = id;
|
||||
LLNotifications::instance().add("FreezeUser", LLSD(), payload, handleFreeze);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::unfreeze(const LLUUID& id)
|
||||
{
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = id;
|
||||
LLNotifications::instance().add("UnFreezeUser", LLSD(), payload, handleUnfreeze);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLAvatarActions::csr(const LLUUID& id)
|
||||
{
|
||||
std::string name;
|
||||
if (!gCacheName->getFullName(id, name)) return;
|
||||
|
||||
std::string url = "http://csr.lindenlab.com/agent/";
|
||||
|
||||
// slow and stupid, but it's late
|
||||
S32 len = name.length();
|
||||
for (S32 i = 0; i < len; i++)
|
||||
{
|
||||
if (name[i] == ' ')
|
||||
{
|
||||
url += "%20";
|
||||
}
|
||||
else
|
||||
{
|
||||
url += name[i];
|
||||
}
|
||||
}
|
||||
|
||||
LLWeb::loadURL(url);
|
||||
}
|
||||
|
||||
// Singu TODO: Share inventory code block should live here
|
||||
|
||||
// static
|
||||
void LLAvatarActions::toggleBlock(const LLUUID& id)
|
||||
{
|
||||
std::string name;
|
||||
|
||||
gCacheName->getFullName(id, name); // needed for mute
|
||||
LLMute mute(id, name, LLMute::AGENT);
|
||||
|
||||
if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName))
|
||||
{
|
||||
LLMuteList::getInstance()->remove(mute);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::canOfferTeleport(const LLUUID& id)
|
||||
{
|
||||
// First use LLAvatarTracker::isBuddy()
|
||||
// If LLAvatarTracker::instance().isBuddyOnline function only is used
|
||||
// then for avatars that are online and not a friend it will return false.
|
||||
// But we should give an ability to offer a teleport for such avatars.
|
||||
if(LLAvatarTracker::instance().isBuddy(id))
|
||||
{
|
||||
return LLAvatarTracker::instance().isBuddyOnline(id);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids)
|
||||
{
|
||||
// We can't send more than 250 lures in a single message, so disable this
|
||||
// button when there are too many id's selected.
|
||||
if(ids.size() > 250) return false;
|
||||
|
||||
bool result = true;
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
if(!canOfferTeleport(*it))
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void LLAvatarActions::inviteToGroup(const LLUUID& id)
|
||||
{
|
||||
LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(id));
|
||||
if (widget)
|
||||
{
|
||||
widget->center();
|
||||
widget->setPowersMask(GP_MEMBER_INVITE);
|
||||
//widget->removeNoneOption();
|
||||
widget->setSelectCallback(callback_invite_to_group, (void*)&id);
|
||||
}
|
||||
}
|
||||
|
||||
//== private methods ========================================================================================
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
const LLSD& ids = notification["payload"]["ids"];
|
||||
for (LLSD::array_const_iterator itr = ids.beginArray(); itr != ids.endArray(); ++itr)
|
||||
{
|
||||
LLUUID id = itr->asUUID();
|
||||
const LLRelationship* ip = LLAvatarTracker::instance().getBuddyInfo(id);
|
||||
if (ip)
|
||||
{
|
||||
switch (option)
|
||||
{
|
||||
case 0: // YES
|
||||
if( ip->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS))
|
||||
{
|
||||
LLAvatarTracker::instance().empower(id, FALSE);
|
||||
LLAvatarTracker::instance().notifyObservers();
|
||||
}
|
||||
LLAvatarTracker::instance().terminateBuddy(id);
|
||||
LLAvatarTracker::instance().notifyObservers();
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL | LLInventoryObserver::CALLING_CARD, LLUUID::null);
|
||||
gInventory.notifyObservers();
|
||||
break;
|
||||
|
||||
case 1: // NO
|
||||
default:
|
||||
llinfos << "No removal performed." << llendl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (option == 0)
|
||||
{
|
||||
gAgent.clearBusy();
|
||||
}
|
||||
|
||||
LLFloaterPay::payDirectly(&give_money, avatar_id, /*is_group=*/false);
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, void* id)
|
||||
{
|
||||
uuid_vec_t agent_ids;
|
||||
agent_ids.push_back(*static_cast<const LLUUID*>(id));
|
||||
|
||||
LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (option == 0)
|
||||
{
|
||||
requestFriendship(notification["payload"]["id"].asUUID(),
|
||||
notification["payload"]["name"].asString(),
|
||||
response["message"].asString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::handleKick(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
msg->newMessageFast(_PREHASH_GodKickUser);
|
||||
msg->nextBlockFast(_PREHASH_UserInfo);
|
||||
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() );
|
||||
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_AgentID, avatar_id );
|
||||
msg->addU32("KickFlags", KICK_FLAGS_DEFAULT );
|
||||
msg->addStringFast(_PREHASH_Reason, response["message"].asString() );
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool LLAvatarActions::handleFreeze(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
msg->newMessageFast(_PREHASH_GodKickUser);
|
||||
msg->nextBlockFast(_PREHASH_UserInfo);
|
||||
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() );
|
||||
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_AgentID, avatar_id );
|
||||
msg->addU32("KickFlags", KICK_FLAGS_FREEZE );
|
||||
msg->addStringFast(_PREHASH_Reason, response["message"].asString() );
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
std::string text = response["message"].asString();
|
||||
if (option == 0)
|
||||
{
|
||||
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
msg->newMessageFast(_PREHASH_GodKickUser);
|
||||
msg->nextBlockFast(_PREHASH_UserInfo);
|
||||
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() );
|
||||
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_AgentID, avatar_id );
|
||||
msg->addU32("KickFlags", KICK_FLAGS_UNFREEZE );
|
||||
msg->addStringFast(_PREHASH_Reason, text );
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message)
|
||||
{
|
||||
const LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD);
|
||||
send_improved_im(target_id,
|
||||
target_name,
|
||||
message,
|
||||
IM_ONLINE,
|
||||
IM_FRIENDSHIP_OFFERED,
|
||||
calling_card_folder_id);
|
||||
|
||||
LLSD args;
|
||||
args["TO_NAME"] = target_name;
|
||||
|
||||
LLSD payload;
|
||||
payload["from_id"] = target_id;
|
||||
//payload["SUPPRESS_TOAST"] = true;
|
||||
LLNotificationsUtil::add("FriendshipOffered", args, payload);
|
||||
}
|
||||
|
||||
//static
|
||||
bool LLAvatarActions::isFriend(const LLUUID& id)
|
||||
{
|
||||
return ( NULL != LLAvatarTracker::instance().getBuddyInfo(id) );
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::isBlocked(const LLUUID& id)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(id);
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAvatarActions::canBlock(const LLUUID& id)
|
||||
{
|
||||
bool is_linden = LLMuteList::getInstance()->isLinden(id);
|
||||
bool is_self = id == gAgentID;
|
||||
return !is_self && !is_linden;
|
||||
}
|
||||
|
||||
188
indra/newview/llavataractions.h
Normal file
188
indra/newview/llavataractions.h
Normal file
@@ -0,0 +1,188 @@
|
||||
/**
|
||||
* @file llavataractions.h
|
||||
* @brief Friend-related actions (add, remove, offer teleport, etc)
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLAVATARACTIONS_H
|
||||
#define LL_LLAVATARACTIONS_H
|
||||
|
||||
class LLFloater;
|
||||
|
||||
/**
|
||||
* Friend-related actions (add, remove, offer teleport, etc)
|
||||
*/
|
||||
class LLAvatarActions
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Show a dialog explaining what friendship entails, then request friendship.
|
||||
*/
|
||||
static void requestFriendshipDialog(const LLUUID& id, const std::string& name);
|
||||
|
||||
/**
|
||||
* Show a dialog explaining what friendship entails, then request friendship.
|
||||
*/
|
||||
static void requestFriendshipDialog(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Show a friend removal dialog.
|
||||
*/
|
||||
static void removeFriendDialog(const LLUUID& id);
|
||||
static void removeFriendsDialog(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Show teleport offer dialog.
|
||||
*/
|
||||
static void offerTeleport(const LLUUID& invitee);
|
||||
static void offerTeleport(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Start instant messaging session.
|
||||
*/
|
||||
static void startIM(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* End instant messaging session.
|
||||
*/
|
||||
static void endIM(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Start an avatar-to-avatar voice call with another user
|
||||
*/
|
||||
static void startCall(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Start an ad-hoc conference voice call with multiple users
|
||||
*/
|
||||
static void startAdhocCall(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Start conference chat with the given avatars.
|
||||
*/
|
||||
static void startConference(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Show avatar profile.
|
||||
*/
|
||||
static void showProfile(const LLUUID& id);
|
||||
static void hideProfile(const LLUUID& id);
|
||||
static bool profileVisible(const LLUUID& id);
|
||||
static LLFloater* getProfileFloater(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Show avatar on world map.
|
||||
*/
|
||||
static void showOnMap(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Give money to the avatar.
|
||||
*/
|
||||
static void pay(const LLUUID& id);
|
||||
/**
|
||||
* Block/unblock the avatar.
|
||||
*/
|
||||
static void toggleBlock(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Return true if avatar with "id" is a friend
|
||||
*/
|
||||
static bool isFriend(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* @return true if the avatar is blocked
|
||||
*/
|
||||
static bool isBlocked(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* @return true if you can block the avatar
|
||||
*/
|
||||
static bool canBlock(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Return true if the avatar is in a P2P voice call with a given user
|
||||
*/
|
||||
/* AD *TODO: Is this function needed any more?
|
||||
I fixed it a bit(added check for canCall), but it appears that it is not used
|
||||
anywhere. Maybe it should be removed?
|
||||
static bool isCalling(const LLUUID &id);*/
|
||||
|
||||
/**
|
||||
* @return true if call to the resident can be made
|
||||
*/
|
||||
|
||||
static bool canCall();
|
||||
/**
|
||||
* Invite avatar to a group.
|
||||
*/
|
||||
static void inviteToGroup(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Kick avatar off grid
|
||||
*/
|
||||
static void kick(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Freeze avatar
|
||||
*/
|
||||
static void freeze(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Unfreeze avatar
|
||||
*/
|
||||
static void unfreeze(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Open csr page for avatar
|
||||
*/
|
||||
static void csr(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* Checks whether we can offer a teleport to the avatar, only offline friends
|
||||
* cannot be offered a teleport.
|
||||
*
|
||||
* @return false if avatar is a friend and not visibly online
|
||||
*/
|
||||
static bool canOfferTeleport(const LLUUID& id);
|
||||
|
||||
/**
|
||||
* @return false if any one of the specified avatars a friend and not visibly online
|
||||
*/
|
||||
static bool canOfferTeleport(const uuid_vec_t& ids);
|
||||
|
||||
private:
|
||||
static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
|
||||
static bool handleRemove(const LLSD& notification, const LLSD& response);
|
||||
static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id);
|
||||
static bool handleKick(const LLSD& notification, const LLSD& response);
|
||||
static bool handleFreeze(const LLSD& notification, const LLSD& response);
|
||||
static bool handleUnfreeze(const LLSD& notification, const LLSD& response);
|
||||
static void callback_invite_to_group(LLUUID group_id, void* id);
|
||||
|
||||
public:
|
||||
// Just request friendship, no dialog.
|
||||
static void requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message);
|
||||
};
|
||||
|
||||
#endif // LL_LLAVATARACTIONS_H
|
||||
|
||||
@@ -36,27 +36,24 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llimview.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llbutton.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llimpanel.h" // LLVoiceChannel
|
||||
#include "llimview.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llsdutil.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llworld.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "llavatarname.h"
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
extern AIHTTPTimeoutPolicy muteVoiceResponder_timeout;
|
||||
extern AIHTTPTimeoutPolicy muteTextResponder_timeout;
|
||||
@@ -770,32 +767,14 @@ void LLPanelActiveSpeakers::onClickProfile(void* user_data)
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
|
||||
LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();
|
||||
|
||||
LLFloaterAvatarInfo::showFromDirectory(speaker_id);
|
||||
LLAvatarActions::showProfile(panelp->mSpeakerList->getValue().asUUID());
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelActiveSpeakers::onDoubleClickSpeaker(void* user_data)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
|
||||
LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();
|
||||
|
||||
LLPointer<LLSpeaker> speakerp = panelp->mSpeakerMgr->findSpeaker(speaker_id);
|
||||
|
||||
if (speaker_id != gAgent.getID() && speakerp.notNull() && !speakerp->mLegacyName.empty())
|
||||
{
|
||||
// Changed for display name support
|
||||
//gIMMgr->addSession(speakerp->mDisplayName, IM_NOTHING_SPECIAL, speaker_id);
|
||||
gIMMgr->addSession(speakerp->mLegacyName, IM_NOTHING_SPECIAL, speaker_id);
|
||||
}
|
||||
LLAvatarActions::startIM(panelp->mSpeakerList->getValue().asUUID());
|
||||
}
|
||||
|
||||
//static
|
||||
|
||||
@@ -35,168 +35,26 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llavatarnamecache.h"
|
||||
|
||||
// viewer project includes
|
||||
#include "llagentdata.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "llimview.h"
|
||||
#include "llfloaterfriends.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llmenucommands.h"
|
||||
#include "llpanelavatar.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llweb.h"
|
||||
|
||||
// linden library includes
|
||||
#include "llinventory.h"
|
||||
#include "lluuid.h"
|
||||
#include "message.h"
|
||||
|
||||
|
||||
const char FLOATER_TITLE[] = "Profile";
|
||||
const LLRect FAI_RECT(0, 530, 420, 0);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Globals
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class LLAgentHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
void verbCallback(const std::string& verb, LLUUID agent_id, const LLAvatarName& avatar_name)
|
||||
{
|
||||
if (verb == "im")
|
||||
{
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
gIMMgr->addSession( avatar_name.getCompleteName(), IM_NOTHING_SPECIAL, agent_id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (verb == "requestfriend")
|
||||
{
|
||||
LLPanelFriends::requestFriendshipDialog( agent_id, avatar_name.getCompleteName() );
|
||||
return;
|
||||
}
|
||||
|
||||
if (verb == "mute")
|
||||
{
|
||||
LLFloaterMute::getInstance()->open();
|
||||
LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT);
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
return;
|
||||
}
|
||||
|
||||
if (verb == "unmute")
|
||||
{
|
||||
LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT);
|
||||
LLMuteList::getInstance()->remove(mute);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// requires trusted browser to trigger
|
||||
LLAgentHandler() : LLCommandHandler("agent", true) { }
|
||||
|
||||
bool handle(const LLSD& params, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
{
|
||||
if (params.size() < 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
LLUUID agent_id;
|
||||
if (!agent_id.set(params[0], FALSE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string verb = params[1].asString();
|
||||
if (verb == "about")
|
||||
{
|
||||
LLFloaterAvatarInfo::show(agent_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "pay")
|
||||
{
|
||||
handle_pay_by_id(agent_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "offerteleport")
|
||||
{
|
||||
handle_lure(agent_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((verb == "im") || (verb == "requestfriend") || (verb == "unmute"))
|
||||
{
|
||||
LLAvatarNameCache::get(agent_id, boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "mute")
|
||||
{
|
||||
if (LLMuteList::getInstance()->isMuted(agent_id))
|
||||
{
|
||||
LLFloaterMute::getInstance()->open();
|
||||
LLFloaterMute::getInstance()->selectMute(agent_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAvatarNameCache::get(agent_id, boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
LLAgentHandler gAgentHandler;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Member functions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void* LLFloaterAvatarInfo::createPanelAvatar(void* data)
|
||||
{
|
||||
LLFloaterAvatarInfo* self = (LLFloaterAvatarInfo*)data;
|
||||
self->mPanelAvatarp = new LLPanelAvatar("PanelAv", LLRect(), TRUE); // allow edit self
|
||||
self->mPanelAvatarp->setAvatarID(self->mAvatarID);
|
||||
return self->mPanelAvatarp;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
BOOL LLFloaterAvatarInfo::postBuild()
|
||||
LLFloaterAvatarInfo::LLFloaterAvatarInfo(const std::string& name, const LLUUID &avatar_id)
|
||||
: LLFloater(name), LLInstanceTracker<LLFloaterAvatarInfo, LLUUID>(avatar_id),
|
||||
mAvatarID(avatar_id)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LLFloaterAvatarInfo::LLFloaterAvatarInfo(const std::string& name, const LLRect &rect, const LLUUID &avatar_id)
|
||||
: LLPreview(name, rect, FLOATER_TITLE, LLUUID::null, LLUUID::null), LLInstanceTracker<LLFloaterAvatarInfo, LLUUID>(avatar_id),
|
||||
mAvatarID( avatar_id ),
|
||||
mSuggestedOnlineStatus(ONLINE_STATUS_NO)
|
||||
{
|
||||
setAutoFocus(TRUE);
|
||||
setAutoFocus(true);
|
||||
|
||||
LLCallbackMap::map_t factory_map;
|
||||
|
||||
factory_map["Panel Avatar"] = LLCallbackMap(createPanelAvatar, this);
|
||||
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_profile.xml", &factory_map);
|
||||
|
||||
if(mPanelAvatarp)
|
||||
{
|
||||
mPanelAvatarp->selectTab(0);
|
||||
}
|
||||
|
||||
//gCacheName->get(avatar_id, FALSE, callbackLoadAvatarName);
|
||||
LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterAvatarInfo::callbackLoadAvatarName, this, _1, _2));
|
||||
}
|
||||
|
||||
// virtual
|
||||
@@ -206,131 +64,11 @@ LLFloaterAvatarInfo::~LLFloaterAvatarInfo()
|
||||
|
||||
void LLFloaterAvatarInfo::resetGroupList()
|
||||
{
|
||||
// only get these updates asynchronously via the group floater, which works on the agent only
|
||||
if (mAvatarID != gAgentID)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mPanelAvatarp->resetGroupList();
|
||||
}
|
||||
|
||||
// static
|
||||
LLFloaterAvatarInfo* LLFloaterAvatarInfo::show(const LLUUID &avatar_id)
|
||||
{
|
||||
if (avatar_id.isNull())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LLFloaterAvatarInfo *floater = LLFloaterAvatarInfo::getInstance(avatar_id);
|
||||
if(!floater)
|
||||
{
|
||||
floater = new LLFloaterAvatarInfo("avatarinfo", FAI_RECT, avatar_id );
|
||||
floater->center();
|
||||
}
|
||||
|
||||
// ...bring that window to front
|
||||
floater->open(); /*Flawfinder: ignore*/
|
||||
return floater;
|
||||
}
|
||||
|
||||
// Open profile to a certain tab.
|
||||
// static
|
||||
void LLFloaterAvatarInfo::showFromObject(const LLUUID& avatar_id,std::string tab_name)
|
||||
{
|
||||
LLFloaterAvatarInfo *floater = show(avatar_id);
|
||||
if (floater)
|
||||
{
|
||||
floater->mPanelAvatarp->setAvatarID(avatar_id, LLStringUtil::null, ONLINE_STATUS_NO);
|
||||
floater->mPanelAvatarp->selectTabByName(tab_name);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterAvatarInfo::showFromDirectory(const LLUUID &avatar_id)
|
||||
{
|
||||
LLFloaterAvatarInfo *floater = show(avatar_id);
|
||||
if (floater)
|
||||
{
|
||||
floater->mPanelAvatarp->setAvatarID(avatar_id, LLStringUtil::null, ONLINE_STATUS_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterAvatarInfo::showFromFriend(const LLUUID& agent_id, BOOL online)
|
||||
{
|
||||
LLFloaterAvatarInfo *floater = show(agent_id);
|
||||
if (floater)
|
||||
{
|
||||
floater->mSuggestedOnlineStatus = online ? ONLINE_STATUS_YES : ONLINE_STATUS_NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterAvatarInfo::showFromProfile(const LLUUID &avatar_id, LLRect rect)
|
||||
{
|
||||
if (avatar_id.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLFloaterAvatarInfo *floater = LLFloaterAvatarInfo::getInstance(avatar_id);
|
||||
if(!floater)
|
||||
{
|
||||
floater = new LLFloaterAvatarInfo("avatarinfo", FAI_RECT, avatar_id);
|
||||
floater->translate(rect.mLeft - floater->getRect().mLeft + 16,
|
||||
rect.mTop - floater->getRect().mTop - 16);
|
||||
floater->mPanelAvatarp->setAvatarID(avatar_id, LLStringUtil::null, ONLINE_STATUS_NO);
|
||||
}
|
||||
floater->open();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarInfo::showProfileCallback(S32 option, void *userdata)
|
||||
{
|
||||
if (option == 0)
|
||||
{
|
||||
showFromObject(gAgentID);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarInfo::callbackLoadAvatarName(const LLUUID& id, const LLAvatarName& av_name)
|
||||
{
|
||||
// Build a new title including the avatar name.
|
||||
std::ostringstream title;
|
||||
//title << first << " " << last << " - " << floater->getTitle();
|
||||
title << av_name.getCompleteName()<< " - " << getTitle();
|
||||
setTitle(title.str());
|
||||
}
|
||||
|
||||
//// virtual
|
||||
void LLFloaterAvatarInfo::draw()
|
||||
{
|
||||
// skip LLPreview::draw()
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFloaterAvatarInfo::canClose()
|
||||
{
|
||||
return mPanelAvatarp && mPanelAvatarp->canClose();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarInfo::loadAsset()
|
||||
{
|
||||
if (mPanelAvatarp) {
|
||||
mPanelAvatarp->setAvatarID(mAvatarID, LLStringUtil::null, mSuggestedOnlineStatus);
|
||||
mAssetStatus = PREVIEW_ASSET_LOADING;
|
||||
}
|
||||
}
|
||||
|
||||
LLPreview::EAssetStatus LLFloaterAvatarInfo::getAssetStatus()
|
||||
{
|
||||
if (mPanelAvatarp && mPanelAvatarp->haveData())
|
||||
{
|
||||
mAssetStatus = PREVIEW_ASSET_LOADED;
|
||||
}
|
||||
return mAssetStatus;
|
||||
}
|
||||
|
||||
@@ -40,66 +40,24 @@
|
||||
#define LL_LLFLOATERAVATARINFO_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llpreview.h"
|
||||
#include "lluuid.h"
|
||||
#include "llpanelavatar.h"
|
||||
#include "llinstancetracker.h"
|
||||
|
||||
class LLAvatarName;
|
||||
class LLButton;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLInventoryItem;
|
||||
class LLLineEditor;
|
||||
class LLMessageSystem;
|
||||
class LLScrollListCtrl;
|
||||
class LLTabContainer;
|
||||
class LLTextBox;
|
||||
class LLTextEditor;
|
||||
class LLTextureCtrl;
|
||||
class LLUICtrl;
|
||||
class LLViewerTexture;
|
||||
class LLViewerObject;
|
||||
class LLPanelAvatar;
|
||||
|
||||
class LLFloaterAvatarInfo
|
||||
: public LLPreview, public LLInstanceTracker<LLFloaterAvatarInfo,LLUUID>
|
||||
: public LLFloater, public LLInstanceTracker<LLFloaterAvatarInfo,LLUUID>
|
||||
{
|
||||
public:
|
||||
static void* createPanelAvatar(void* data);
|
||||
|
||||
virtual BOOL postBuild();
|
||||
|
||||
LLFloaterAvatarInfo(const std::string& name, const LLRect &rect, const LLUUID &avatar_id );
|
||||
LLFloaterAvatarInfo(const std::string& name, const LLUUID &avatar_id);
|
||||
/*virtual*/ ~LLFloaterAvatarInfo();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
|
||||
/*virtual*/ BOOL canClose();
|
||||
|
||||
/*virtual*/ void loadAsset();
|
||||
/*virtual*/ EAssetStatus getAssetStatus();
|
||||
|
||||
static LLFloaterAvatarInfo* show(const LLUUID& avatar_id);
|
||||
// Core method, doesn't do anything funny with online status or
|
||||
// tab selection.
|
||||
|
||||
static void showFromObject(const LLUUID &avatar_id, std::string tab_name = std::string());
|
||||
|
||||
static void showFromDirectory(const LLUUID &avatar_id);
|
||||
|
||||
static void showFromFriend(const LLUUID &agent_id, BOOL online);
|
||||
|
||||
static void showFromProfile(const LLUUID &avatar_id, LLRect rect);
|
||||
|
||||
static void showProfileCallback(S32 option, void *userdata);
|
||||
void callbackLoadAvatarName(const LLUUID& agent_id, const LLAvatarName& av_name);
|
||||
void resetGroupList();
|
||||
|
||||
private:
|
||||
LLUUID mAvatarID; // for which avatar is this window?
|
||||
LLPanelAvatar* mPanelAvatarp;
|
||||
EOnlineStatus mSuggestedOnlineStatus;
|
||||
};
|
||||
|
||||
std::string getProfileURL(const std::string& agent_name);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,21 +25,17 @@
|
||||
#include "llwindow.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include "llvoavatar.h"
|
||||
#include "llimview.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llregionflags.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "lltracker.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llerror.h"
|
||||
#include "llchat.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llviewermessage.h"
|
||||
@@ -882,7 +878,7 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
name_color = ascent_estate_owner_color;
|
||||
}
|
||||
//without these dots, SL would suck.
|
||||
else if(is_agent_friend(av_id))
|
||||
else if(LLAvatarActions::isFriend(av_id))
|
||||
{
|
||||
static const LLCachedControl<LLColor4> ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f));
|
||||
name_color = ascent_friend_color;
|
||||
@@ -1142,22 +1138,12 @@ void LLFloaterAvatarList::onClickIM()
|
||||
if (ids.size() == 1)
|
||||
{
|
||||
// Single avatar
|
||||
LLUUID agent_id = ids[0];
|
||||
|
||||
std::string avatar_name;
|
||||
if (gCacheName->getFullName(agent_id, avatar_name))
|
||||
{
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
gIMMgr->addSession(avatar_name,IM_NOTHING_SPECIAL,agent_id);
|
||||
}
|
||||
LLAvatarActions::startIM(ids[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Group IM
|
||||
LLUUID session_id;
|
||||
session_id.generate();
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
gIMMgr->addSession("Avatars Conference", IM_SESSION_CONFERENCE_START, ids[0], ids);
|
||||
LLAvatarActions::startConference(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1265,30 +1251,7 @@ BOOL LLFloaterAvatarList::handleKeyHere(KEY key, MASK mask)
|
||||
|
||||
if (( KEY_RETURN == key ) && (MASK_SHIFT == mask))
|
||||
{
|
||||
uuid_vec_t ids = mAvatarList->getSelectedIDs();
|
||||
if (ids.size() > 0)
|
||||
{
|
||||
if (ids.size() == 1)
|
||||
{
|
||||
// Single avatar
|
||||
LLUUID agent_id = ids[0];
|
||||
|
||||
std::string avatar_name;
|
||||
if (gCacheName->getFullName(agent_id, avatar_name))
|
||||
{
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
gIMMgr->addSession(avatar_name,IM_NOTHING_SPECIAL,agent_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Group IM
|
||||
LLUUID session_id;
|
||||
session_id.generate();
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
gIMMgr->addSession("Avatars Conference", IM_SESSION_CONFERENCE_START, ids[0], ids);
|
||||
}
|
||||
}
|
||||
onClickIM();
|
||||
}
|
||||
return LLPanel::handleKeyHere(key, mask);
|
||||
}
|
||||
@@ -1553,7 +1516,7 @@ static void cmd_append_names(const LLAvatarListEntry* entry, std::string &str, s
|
||||
{ if(!str.empty())str.append(sep);str.append(entry->getName()); }
|
||||
static void cmd_toggle_mark(LLAvatarListEntry* entry) { entry->toggleMark(); }
|
||||
static void cmd_ar(const LLAvatarListEntry* entry) { LLFloaterReporter::showFromObject(entry->getID()); }
|
||||
static void cmd_profile(const LLAvatarListEntry* entry) { LLFloaterAvatarInfo::showFromDirectory(entry->getID()); }
|
||||
static void cmd_profile(const LLAvatarListEntry* entry) { LLAvatarActions::showProfile(entry->getID()); }
|
||||
static void cmd_teleport(const LLAvatarListEntry* entry) { gAgent.teleportViaLocation(entry->getPosition()); }
|
||||
static void cmd_freeze(const LLAvatarListEntry* entry) { send_freeze(entry->getID(), true); }
|
||||
static void cmd_unfreeze(const LLAvatarListEntry* entry) { send_freeze(entry->getID(), false); }
|
||||
|
||||
@@ -557,7 +557,10 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
std::string avatar_name = selection->getColumn(0)->getValue().asString();
|
||||
if (dest_agent_id.notNull() && dest_agent_id != gAgentID)
|
||||
{
|
||||
if (drop)
|
||||
// if (drop)
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
if ( (drop) && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStartIM(dest_agent_id)) ) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// Start up IM before give the item
|
||||
session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, dest_agent_id);
|
||||
|
||||
@@ -389,9 +389,7 @@ void* LLFloaterDirectory::createEventDetail(void* userdata)
|
||||
void* LLFloaterDirectory::createGroupDetail(void* userdata)
|
||||
{
|
||||
LLFloaterDirectory *self = (LLFloaterDirectory*)userdata;
|
||||
self->mPanelGroupp = new LLPanelGroup("panel_group.xml",
|
||||
"PanelGroup",
|
||||
gAgent.getGroupID());
|
||||
self->mPanelGroupp = new LLPanelGroup(gAgent.getGroupID());
|
||||
self->mPanelGroupp->setAllowEdit(FALSE || gAgent.isGodlike()); // Gods can always edit panels
|
||||
self->mPanelGroupp->setVisible(FALSE);
|
||||
return self->mPanelGroupp;
|
||||
|
||||
@@ -37,46 +37,31 @@
|
||||
|
||||
#include "llfloaterfriends.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "lldir.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llappviewer.h" // for gLastVersionChannel
|
||||
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llbutton.h"
|
||||
#include "lldir.h"
|
||||
#include "lleventtimer.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llimview.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llmenucommands.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "lleventtimer.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoiceclient.h"
|
||||
|
||||
#include "llsdserialize.h"
|
||||
#include "statemachine/aifilepicker.h"
|
||||
|
||||
#include "llviewermenufile.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewernetwork.h"
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
#include "llchat.h"
|
||||
#include "llfloaterchat.h"
|
||||
|
||||
// <dogmode> stuff for Contact groups
|
||||
//#include "ascentfloatercontactgroups.h"
|
||||
//#include "llchat.h"
|
||||
//#include "llfloaterchat.h"
|
||||
|
||||
#define DEFAULT_PERIOD 5.0
|
||||
#define RIGHTS_CHANGE_TIMEOUT 5.0
|
||||
@@ -399,10 +384,10 @@ BOOL LLPanelFriends::postBuild()
|
||||
//childSetAction("assign_btn", onClickAssign, this);
|
||||
childSetAction("expand_collapse_btn", onClickExpand, this);
|
||||
childSetAction("profile_btn", onClickProfile, this);
|
||||
childSetAction("offer_teleport_btn", onClickOfferTeleport, this);
|
||||
getChild<LLUICtrl>("offer_teleport_btn")->setCommitCallback(boost::bind(static_cast<void(*)(const uuid_vec_t&)>(LLAvatarActions::offerTeleport), boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList)));
|
||||
childSetAction("pay_btn", onClickPay, this);
|
||||
childSetAction("add_btn", onClickAddFriend, this);
|
||||
childSetAction("remove_btn", onClickRemove, this);
|
||||
getChild<LLUICtrl>("remove_btn")->setCommitCallback(boost::bind(LLAvatarActions::removeFriendsDialog, boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList)));
|
||||
//childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB
|
||||
//childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB
|
||||
|
||||
@@ -685,7 +670,6 @@ BOOL LLPanelFriends::refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_b
|
||||
|
||||
BOOL LLPanelFriends::refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies)
|
||||
{
|
||||
|
||||
std::vector<LLScrollListItem*> items = mFriendsList->getAllData();
|
||||
std::sort(items.begin(), items.end(), SortFriendsByID());
|
||||
|
||||
@@ -784,10 +768,7 @@ void LLPanelFriends::onClickProfile(void* user_data)
|
||||
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
|
||||
if(!ids.empty())
|
||||
{
|
||||
LLUUID agent_id = ids[0];
|
||||
BOOL online;
|
||||
online = LLAvatarTracker::instance().isBuddyOnline(agent_id);
|
||||
LLFloaterAvatarInfo::showFromFriend(agent_id, online);
|
||||
LLAvatarActions::showProfile(ids[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -843,14 +824,6 @@ void LLPanelFriends::updateColumns(void* user_data)
|
||||
}
|
||||
}
|
||||
|
||||
static void on_avatar_name_cache_start_im(const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
|
||||
if (!tear_off) gIMMgr->setFloaterOpen(true);
|
||||
gIMMgr->addSession(LLCacheName::cleanFullName(av_name.getLegacyName()), IM_NOTHING_SPECIAL, agent_id);
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
|
||||
void LLPanelFriends::onClickIM(void* user_data)
|
||||
{
|
||||
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
|
||||
@@ -861,95 +834,22 @@ void LLPanelFriends::onClickIM(void* user_data)
|
||||
{
|
||||
if(ids.size() == 1)
|
||||
{
|
||||
LLAvatarNameCache::get(ids[0], boost::bind(&on_avatar_name_cache_start_im, _1, _2));
|
||||
LLAvatarActions::startIM(ids[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
|
||||
if (!tear_off) gIMMgr->setFloaterOpen(true);
|
||||
gIMMgr->addSession("Friends Conference", IM_SESSION_CONFERENCE_START, ids[0], ids);
|
||||
make_ui_sound("UISndStartIM");
|
||||
LLAvatarActions::startConference(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFriends::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message)
|
||||
{
|
||||
LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD);
|
||||
send_improved_im(target_id,
|
||||
target_name,
|
||||
message,
|
||||
IM_ONLINE,
|
||||
IM_FRIENDSHIP_OFFERED,
|
||||
calling_card_folder_id);
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLPanelFriends::callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (option == 0)
|
||||
{
|
||||
requestFriendship(notification["payload"]["id"].asUUID(),
|
||||
notification["payload"]["name"].asString(),
|
||||
response["message"].asString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLPanelFriends::callbackAddFriend(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
if (option == 0)
|
||||
{
|
||||
// Servers older than 1.25 require the text of the message to be the
|
||||
// calling card folder ID for the offering user. JC
|
||||
LLUUID calling_card_folder_id =
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD);
|
||||
std::string message = calling_card_folder_id.asString();
|
||||
requestFriendship(notification["payload"]["id"].asUUID(),
|
||||
notification["payload"]["name"].asString(),
|
||||
message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFriends::onPickAvatar( const uuid_vec_t& ids,
|
||||
const std::vector<LLAvatarName>& names )
|
||||
{
|
||||
if (names.empty()) return;
|
||||
if (ids.empty()) return;
|
||||
requestFriendshipDialog(ids[0], names[0].getCompleteName());
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFriends::requestFriendshipDialog(const LLUUID& id,
|
||||
const std::string& name)
|
||||
{
|
||||
if(id == gAgentID)
|
||||
{
|
||||
LLNotificationsUtil::add("AddSelfFriend");
|
||||
return;
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
args["NAME"] = name;
|
||||
LLSD payload;
|
||||
payload["id"] = id;
|
||||
payload["name"] = name;
|
||||
// Look for server versions like: Second Life Server 1.24.4.95600
|
||||
if (gLastVersionChannel.find(" 1.24.") != std::string::npos)
|
||||
{
|
||||
// Old and busted server version, doesn't support friend
|
||||
// requests with messages.
|
||||
LLNotificationsUtil::add("AddFriend", args, payload, &callbackAddFriend);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
|
||||
}
|
||||
LLAvatarActions::requestFriendshipDialog(ids[0], names[0].getCompleteName());
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -964,44 +864,6 @@ void LLPanelFriends::onClickAddFriend(void* user_data)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFriends::onClickRemove(void* user_data)
|
||||
{
|
||||
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
|
||||
|
||||
//llinfos << "LLPanelFriends::onClickRemove()" << llendl;
|
||||
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
|
||||
LLSD args;
|
||||
if(!ids.empty())
|
||||
{
|
||||
std::string msgType = "RemoveFromFriends";
|
||||
if(ids.size() == 1)
|
||||
{
|
||||
LLUUID agent_id = ids[0];
|
||||
std::string fullname;
|
||||
if (LLAvatarNameCache::getPNSName(agent_id, fullname))
|
||||
args["NAME"] = fullname;
|
||||
}
|
||||
else
|
||||
{
|
||||
msgType = "RemoveMultipleFromFriends";
|
||||
}
|
||||
LLSD payload;
|
||||
|
||||
for (uuid_vec_t::const_iterator it = ids.begin();
|
||||
it != ids.end();
|
||||
++it)
|
||||
{
|
||||
payload["ids"].append(*it);
|
||||
}
|
||||
|
||||
LLNotifications::instance().add(msgType,
|
||||
args,
|
||||
payload,
|
||||
&handleRemove);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelFriends::onClickExport(void* user_data)
|
||||
{
|
||||
std::string agn;
|
||||
@@ -1052,7 +914,6 @@ void LLPanelFriends::onClickExport_continued(void* user_data, AIFilePicker* file
|
||||
export_file.close();
|
||||
}
|
||||
|
||||
bool LLPanelFriends::merging;
|
||||
|
||||
void LLPanelFriends::onClickImport(void* user_data)
|
||||
{
|
||||
@@ -1093,6 +954,7 @@ void LLPanelFriends::onClickImport_filepicker_continued(AIFilePicker* filepicker
|
||||
LLSD importstatellsd;
|
||||
LLSDSerialize::fromXMLDocument(importstatellsd, stateload);
|
||||
|
||||
static bool merging;
|
||||
|
||||
//LLMessageSystem* msg = gMessageSystem;
|
||||
LLSD newdata;
|
||||
@@ -1110,10 +972,10 @@ void LLPanelFriends::onClickImport_filepicker_continued(AIFilePicker* filepicker
|
||||
if(merging && importstatellsd.has(agent_id.asString()))continue;//dont need to request what we've already requested from another list import and have not got a reply yet
|
||||
|
||||
std::string agent_name = content["name"];
|
||||
if(!is_agent_friend(agent_id))//dont need to request what we have
|
||||
if(!LLAvatarActions::isFriend(agent_id))//dont need to request what we have
|
||||
{
|
||||
if(merging)importstatellsd[agent_id.asString()] = content;//MERGEEEE
|
||||
requestFriendship(agent_id, agent_name, "Imported from "+file);
|
||||
LLAvatarActions::requestFriendship(agent_id, agent_name, "Imported from "+file);
|
||||
newdata[iter->first] = iter->second;
|
||||
}else
|
||||
{
|
||||
@@ -1157,7 +1019,7 @@ void LLPanelFriends::FriendImportState(LLUUID id, bool accepted)
|
||||
if(can_map)rights |= LLRelationship::GRANT_MAP_LOCATION;
|
||||
if(can_mod)rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
|
||||
if(see_online)rights |= LLRelationship::GRANT_ONLINE_STATUS;
|
||||
if(is_agent_friend(id))//is this legit shit yo
|
||||
if(LLAvatarActions::isFriend(id))//is this legit shit yo
|
||||
{
|
||||
const LLRelationship* friend_status = LLAvatarTracker::instance().getBuddyInfo(id);
|
||||
if(friend_status)
|
||||
@@ -1187,18 +1049,6 @@ void LLPanelFriends::FriendImportState(LLUUID id, bool accepted)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFriends::onClickOfferTeleport(void* user_data)
|
||||
{
|
||||
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
|
||||
|
||||
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
|
||||
if(!ids.empty())
|
||||
{
|
||||
handle_lure(ids);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFriends::onClickPay(void* user_data)
|
||||
{
|
||||
@@ -1207,58 +1057,52 @@ void LLPanelFriends::onClickPay(void* user_data)
|
||||
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
|
||||
if(!ids.empty())
|
||||
{
|
||||
handle_pay_by_id(ids[0]);
|
||||
LLAvatarActions::pay(ids[0]);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command)
|
||||
void LLPanelFriends::confirmModifyRights(rights_map_t& rights, EGrantRevoke command)
|
||||
{
|
||||
if (ids.empty()) return;
|
||||
if (rights.empty()) return;
|
||||
|
||||
LLSD args;
|
||||
if(!ids.empty())
|
||||
// for single friend, show their name
|
||||
if (rights.size() == 1)
|
||||
{
|
||||
rights_map_t* rights = new rights_map_t(ids);
|
||||
LLSD args;
|
||||
std::string fullname;
|
||||
if (LLAvatarNameCache::getPNSName(rights.begin()->first, fullname))
|
||||
args["NAME"] = fullname;
|
||||
|
||||
// for single friend, show their name
|
||||
if(ids.size() == 1)
|
||||
if (command == GRANT)
|
||||
{
|
||||
LLUUID agent_id = ids.begin()->first;
|
||||
std::string fullname;
|
||||
if (LLAvatarNameCache::getPNSName(agent_id, fullname))
|
||||
args["NAME"] = fullname;
|
||||
|
||||
if (command == GRANT)
|
||||
{
|
||||
LLNotificationsUtil::add("GrantModifyRights",
|
||||
args,
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("RevokeModifyRights",
|
||||
args,
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
|
||||
}
|
||||
LLNotificationsUtil::add("GrantModifyRights",
|
||||
args,
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, &rights));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (command == GRANT)
|
||||
{
|
||||
LLNotificationsUtil::add("GrantModifyRightsMultiple",
|
||||
args,
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("RevokeModifyRightsMultiple",
|
||||
args,
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
|
||||
}
|
||||
LLNotificationsUtil::add("RevokeModifyRights",
|
||||
args,
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, &rights));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (command == GRANT)
|
||||
{
|
||||
LLNotificationsUtil::add("GrantModifyRightsMultiple",
|
||||
LLSD(),
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, &rights));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("RevokeModifyRightsMultiple",
|
||||
LLSD(),
|
||||
LLSD(),
|
||||
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, &rights));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1405,42 +1249,3 @@ void LLPanelFriends::sendRightsGrant(rights_map_t& ids)
|
||||
mNumRightsChanged = ids.size();
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// static
|
||||
bool LLPanelFriends::handleRemove(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
const LLSD& ids = notification["payload"]["ids"];
|
||||
for(LLSD::array_const_iterator itr = ids.beginArray(); itr != ids.endArray(); ++itr)
|
||||
{
|
||||
LLUUID id = itr->asUUID();
|
||||
const LLRelationship* ip = LLAvatarTracker::instance().getBuddyInfo(id);
|
||||
if(ip)
|
||||
{
|
||||
switch(option)
|
||||
{
|
||||
case 0: // YES
|
||||
if( ip->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS))
|
||||
{
|
||||
LLAvatarTracker::instance().empower(id, FALSE);
|
||||
LLAvatarTracker::instance().notifyObservers();
|
||||
}
|
||||
LLAvatarTracker::instance().terminateBuddy(id);
|
||||
LLAvatarTracker::instance().notifyObservers();
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL | LLInventoryObserver::CALLING_CARD, LLUUID::null);
|
||||
gInventory.notifyObservers();
|
||||
break;
|
||||
|
||||
case 1: // NO
|
||||
default:
|
||||
llinfos << "No removal performed." << llendl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -76,15 +76,6 @@ public:
|
||||
|
||||
virtual BOOL postBuild();
|
||||
|
||||
// Show a dialog explaining what friendship entails, then request
|
||||
// friendship. JC
|
||||
static void requestFriendshipDialog(const LLUUID& target_id,
|
||||
const std::string& target_name);
|
||||
|
||||
// Just request friendship, no dialog.
|
||||
static void requestFriendship(const LLUUID& target_id,
|
||||
const std::string& target_name, const std::string& message);
|
||||
|
||||
void populateContactGroupSelect();
|
||||
|
||||
private:
|
||||
@@ -130,8 +121,6 @@ private:
|
||||
// callback methods
|
||||
static void onSelectName(LLUICtrl* ctrl, void* user_data);
|
||||
static void onChangeContactGroup(LLUICtrl* ctrl, void* user_data);
|
||||
static bool callbackAddFriend(const LLSD& notification, const LLSD& response);
|
||||
static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
|
||||
static void onPickAvatar(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names );
|
||||
void onContactFilterEdit(const std::string& search_string);
|
||||
static void onClickIM(void* user_data);
|
||||
@@ -140,7 +129,6 @@ private:
|
||||
static void updateColumns(void* user_data);
|
||||
static void onClickProfile(void* user_data);
|
||||
static void onClickAddFriend(void* user_data);
|
||||
static void onClickRemove(void* user_data);
|
||||
static void onClickExport(void* user_data);
|
||||
static void onClickExport_continued(void* user_data, AIFilePicker* filepicker);
|
||||
static void onClickImport(void* user_data);
|
||||
@@ -148,12 +136,9 @@ private:
|
||||
public:
|
||||
static void FriendImportState(LLUUID id, bool accepted);
|
||||
private:
|
||||
static void onClickOfferTeleport(void* user_data);
|
||||
static void onClickPay(void* user_data);
|
||||
|
||||
static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
|
||||
|
||||
static bool handleRemove(const LLSD& notification, const LLSD& response);
|
||||
bool modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights);
|
||||
|
||||
private:
|
||||
@@ -168,7 +153,6 @@ private:
|
||||
S32 mNumRightsChanged;
|
||||
S32 mNumOnline;
|
||||
std::string mLastContactSearch;
|
||||
static bool merging;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -36,100 +36,30 @@
|
||||
|
||||
#include "llfloatergroupinfo.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llpanelgroup.h"
|
||||
#include "llviewermessage.h" // for inventory_offer_callback
|
||||
//#include "llviewerwindow.h"
|
||||
#include "llnotifications.h"
|
||||
|
||||
#include "llcachename.h"
|
||||
#include "llpanelgroup.h"
|
||||
|
||||
const char FLOATER_TITLE[] = "Group Information";
|
||||
const LLRect FGI_RECT(0, 530, 420, 0);
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
std::map<LLUUID, LLFloaterGroupInfo*> LLFloaterGroupInfo::sInstances;
|
||||
|
||||
class LLGroupHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// requires trusted browser to trigger
|
||||
LLGroupHandler() : LLCommandHandler("group", true) { }
|
||||
bool handle(const LLSD& tokens, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
{
|
||||
if (tokens.size() < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tokens[0].asString() == "create")
|
||||
{
|
||||
LLFloaterGroupInfo::showCreateGroup(NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tokens.size() < 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tokens[0].asString() == "list")
|
||||
{
|
||||
if (tokens[1].asString() == "show")
|
||||
{
|
||||
// CP_TODO: get the value we pass in via the XUI name
|
||||
// of the tab instead of using a literal like this
|
||||
LLFloaterMyFriends::showInstance( 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID group_id;
|
||||
if (!group_id.set(tokens[0], FALSE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((tokens[1].asString() == "about") || (tokens[1].asString() == "inspect"))
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
LLGroupHandler gGroupHandler;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Implementation
|
||||
//-----------------------------------------------------------------------------
|
||||
LLFloaterGroupInfo::LLFloaterGroupInfo(const std::string& name, const LLRect &rect, const std::string& title, const LLUUID& group_id, const std::string& tab_name)
|
||||
: LLFloater(name, rect, title),
|
||||
mGroupID( group_id )
|
||||
LLFloaterGroupInfo::LLFloaterGroupInfo(const LLUUID& group_id)
|
||||
: LLFloater(FLOATER_TITLE, LLRect(0, 530, 420, 0), FLOATER_TITLE), LLInstanceTracker<LLFloaterGroupInfo, LLUUID>(group_id)
|
||||
{
|
||||
llinfos << name << " : " << title << llendl;
|
||||
llinfos << rect << llendl;
|
||||
llinfos << getRect() << llendl;
|
||||
llinfos << getLocalRect() << llendl;
|
||||
// Construct the filename of the group panel xml definition file.
|
||||
mPanelGroupp = new LLPanelGroup("panel_group.xml",
|
||||
"PanelGroup",
|
||||
group_id,
|
||||
tab_name);
|
||||
mPanelGroupp = new LLPanelGroup(group_id);
|
||||
addChild(mPanelGroupp);
|
||||
if (group_id.notNull())
|
||||
{
|
||||
// Look up the group name. The callback will insert it into the title.
|
||||
gCacheName->get(group_id, true, boost::bind(&LLFloaterGroupInfo::callbackLoadGroupName, this, _2));
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLFloaterGroupInfo::~LLFloaterGroupInfo()
|
||||
{
|
||||
sInstances.erase(mGroupID);
|
||||
}
|
||||
|
||||
BOOL LLFloaterGroupInfo::canClose()
|
||||
@@ -147,125 +77,11 @@ void LLFloaterGroupInfo::selectTabByName(std::string tab_name)
|
||||
mPanelGroupp->selectTab(tab_name);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::showMyGroupInfo(void *)
|
||||
void LLFloaterGroupInfo::callbackLoadGroupName(const std::string& full_name)
|
||||
{
|
||||
showFromUUID( gAgent.getGroupID() );
|
||||
// Build a new title including the group name.
|
||||
std::ostringstream title;
|
||||
title << full_name << " - " << FLOATER_TITLE;
|
||||
setTitle(title.str());
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::showCreateGroup(void *)
|
||||
{
|
||||
showFromUUID(LLUUID::null, "general_tab");
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::closeGroup(const LLUUID& group_id)
|
||||
{
|
||||
LLFloaterGroupInfo *fgi = get_if_there(sInstances, group_id, (LLFloaterGroupInfo*)NULL);
|
||||
if (fgi)
|
||||
{
|
||||
if (fgi->mPanelGroupp)
|
||||
{
|
||||
fgi->mPanelGroupp->close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::closeCreateGroup()
|
||||
{
|
||||
closeGroup(LLUUID::null);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::refreshGroup(const LLUUID& group_id)
|
||||
{
|
||||
LLFloaterGroupInfo *fgi = get_if_there(sInstances, group_id, (LLFloaterGroupInfo*)NULL);
|
||||
if (fgi)
|
||||
{
|
||||
if (fgi->mPanelGroupp)
|
||||
{
|
||||
fgi->mPanelGroupp->refreshData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::callbackLoadGroupName(const LLUUID& id, const std::string& full_name, bool is_group)
|
||||
{
|
||||
LLFloaterGroupInfo *fgi = get_if_there(sInstances, id, (LLFloaterGroupInfo*)NULL);
|
||||
|
||||
if (fgi)
|
||||
{
|
||||
// Build a new title including the group name.
|
||||
std::ostringstream title;
|
||||
title << full_name << " - " << FLOATER_TITLE;
|
||||
fgi->setTitle(title.str());
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::showFromUUID(const LLUUID& group_id,
|
||||
const std::string& tab_name)
|
||||
{
|
||||
// If we don't have a floater for this group, create one.
|
||||
LLFloaterGroupInfo *fgi = get_if_there(sInstances, group_id, (LLFloaterGroupInfo*)NULL);
|
||||
if (!fgi)
|
||||
{
|
||||
fgi = new LLFloaterGroupInfo("groupinfo",
|
||||
FGI_RECT,
|
||||
FLOATER_TITLE,
|
||||
group_id,
|
||||
tab_name);
|
||||
|
||||
sInstances[group_id] = fgi;
|
||||
|
||||
if (group_id.notNull())
|
||||
{
|
||||
// Look up the group name.
|
||||
// The callback will insert it into the title.
|
||||
gCacheName->get(group_id, true, boost::bind(&callbackLoadGroupName, _1, _2, _3));
|
||||
}
|
||||
}
|
||||
|
||||
fgi->selectTabByName(tab_name);
|
||||
|
||||
fgi->center();
|
||||
fgi->open(); /*Flawfinder: ignore*/
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGroupInfo::showNotice(const std::string& subject,
|
||||
const std::string& message,
|
||||
const LLUUID& group_id,
|
||||
const bool& has_inventory,
|
||||
const std::string& inventory_name,
|
||||
LLOfferInfo* inventory_offer)
|
||||
{
|
||||
llinfos << "LLFloaterGroupInfo::showNotice : " << subject << llendl;
|
||||
|
||||
if (group_id.isNull())
|
||||
{
|
||||
// We need to clean up that inventory offer.
|
||||
if (inventory_offer)
|
||||
{
|
||||
inventory_offer->forceResponse(IOR_DECLINE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// If we don't have a floater for this group, drop this packet on the floor.
|
||||
LLFloaterGroupInfo *fgi = get_if_there(sInstances, group_id, (LLFloaterGroupInfo*)NULL);
|
||||
if (!fgi)
|
||||
{
|
||||
// We need to clean up that inventory offer.
|
||||
if (inventory_offer)
|
||||
{
|
||||
inventory_offer->forceResponse(IOR_DECLINE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fgi->mPanelGroupp->showNotice(subject,message,has_inventory,inventory_name,inventory_offer);
|
||||
}
|
||||
|
||||
@@ -39,48 +39,29 @@
|
||||
#define LL_LLFLOATERGROUPINFO_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lluuid.h"
|
||||
#include "llinstancetracker.h"
|
||||
|
||||
class LLPanelGroup;
|
||||
struct LLOfferInfo;
|
||||
|
||||
class LLFloaterGroupInfo
|
||||
: public LLFloater
|
||||
: public LLFloater, public LLInstanceTracker<LLFloaterGroupInfo, LLUUID>
|
||||
{
|
||||
public:
|
||||
LLFloaterGroupInfo(const LLUUID& group_id);
|
||||
virtual ~LLFloaterGroupInfo();
|
||||
|
||||
static void showCreateGroup(void *);
|
||||
static void showMyGroupInfo(void *);
|
||||
static void showFromUUID(const LLUUID &group_id,
|
||||
const std::string& tab_name = std::string());
|
||||
static void closeCreateGroup();
|
||||
static void closeGroup(const LLUUID& group_id);
|
||||
static void refreshGroup(const LLUUID& group_id);
|
||||
|
||||
static void showNotice(const std::string& subject,
|
||||
const std::string& message,
|
||||
const LLUUID& group_id,
|
||||
const bool& has_inventory,
|
||||
const std::string& inventory_name,
|
||||
LLOfferInfo* inventory_offer);
|
||||
|
||||
LLUUID getGroupID() { return mGroupID;}
|
||||
|
||||
void selectTabByName(std::string tab_name);
|
||||
|
||||
// This allow us to block the user from closing the floater
|
||||
// if there is information that needs to be applied.
|
||||
// This allows us to block the user from closing the floater if there is information that needs to be applied.
|
||||
virtual BOOL canClose();
|
||||
|
||||
protected:
|
||||
LLFloaterGroupInfo(const std::string& name, const LLRect &rect, const std::string& title, const LLUUID& group_id = LLUUID::null, const std::string& tab_name = std::string());
|
||||
friend class LLGroupActions;
|
||||
LLPanelGroup* mPanelGroupp;
|
||||
|
||||
private:
|
||||
static void callbackLoadGroupName(const LLUUID& id, const std::string& full_name, bool is_group);
|
||||
static std::map<LLUUID, LLFloaterGroupInfo*> sInstances;
|
||||
|
||||
LLUUID mGroupID;
|
||||
LLPanelGroup* mPanelGroupp;
|
||||
void callbackLoadGroupName(const std::string& full_name);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
@@ -218,23 +219,23 @@ BOOL LLPanelGroups::postBuild()
|
||||
init_group_list(group_list, gAgent.getGroupID(), none_text);
|
||||
group_list->setCommitCallback(boost::bind(&LLPanelGroups::onGroupList,this));
|
||||
group_list->setSortChangedCallback(boost::bind(&LLPanelGroups::onGroupSortChanged,this)); //Force 'none' to always be first entry.
|
||||
group_list->setDoubleClickCallback(boost::bind(&LLPanelGroups::onBtnIM,this));
|
||||
group_list->setDoubleClickCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
|
||||
childSetAction("Activate", onBtnActivate, this);
|
||||
getChild<LLUICtrl>("Activate")->setCommitCallback(boost::bind(LLGroupActions::activate, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
|
||||
childSetAction("Info", onBtnInfo, this);
|
||||
getChild<LLUICtrl>("Info")->setCommitCallback(boost::bind(LLGroupActions::show, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
|
||||
childSetAction("IM", onBtnIM, this);
|
||||
getChild<LLUICtrl>("IM")->setCommitCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
|
||||
childSetAction("Leave", onBtnLeave, this);
|
||||
getChild<LLUICtrl>("Leave")->setCommitCallback(boost::bind(LLGroupActions::leave, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
|
||||
childSetAction("Create", onBtnCreate, this);
|
||||
getChild<LLUICtrl>("Create")->setCommitCallback(boost::bind(LLGroupActions::createGroup));
|
||||
|
||||
childSetAction("Search...", onBtnSearch, this);
|
||||
getChild<LLUICtrl>("Search...")->setCommitCallback(boost::bind(LLGroupActions::search));
|
||||
|
||||
childSetAction("Invite...", onBtnInvite, this);
|
||||
|
||||
childSetAction("Titles...", onBtnTitles, this);
|
||||
getChild<LLUICtrl>("Titles...")->setCommitCallback(boost::bind(HBFloaterGroupTitles::toggle));
|
||||
|
||||
setDefaultBtn("IM");
|
||||
|
||||
@@ -291,148 +292,12 @@ void LLPanelGroups::enableButtons()
|
||||
}
|
||||
|
||||
|
||||
void LLPanelGroups::onBtnCreate(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->create();
|
||||
}
|
||||
|
||||
void LLPanelGroups::onBtnInvite(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->invite();
|
||||
}
|
||||
|
||||
void LLPanelGroups::onBtnActivate(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->activate();
|
||||
}
|
||||
|
||||
void LLPanelGroups::onBtnInfo(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->info();
|
||||
}
|
||||
|
||||
void LLPanelGroups::onBtnIM(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->startIM();
|
||||
}
|
||||
|
||||
void LLPanelGroups::onBtnLeave(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->leave();
|
||||
}
|
||||
|
||||
void LLPanelGroups::onBtnSearch(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->search();
|
||||
}
|
||||
|
||||
void LLPanelGroups::onBtnTitles(void* userdata)
|
||||
{
|
||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
||||
if(self) self->titles();
|
||||
}
|
||||
|
||||
void LLPanelGroups::create()
|
||||
{
|
||||
llinfos << "LLPanelGroups::create" << llendl;
|
||||
LLFloaterGroupInfo::showCreateGroup(NULL);
|
||||
}
|
||||
|
||||
void LLPanelGroups::activate()
|
||||
{
|
||||
llinfos << "LLPanelGroups::activate" << llendl;
|
||||
LLCtrlListInterface *group_list = childGetListInterface("group list");
|
||||
LLUUID group_id;
|
||||
if (group_list)
|
||||
{
|
||||
group_id = group_list->getCurrentID();
|
||||
}
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_ActivateGroup);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_GroupID, group_id);
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
||||
void LLPanelGroups::info()
|
||||
{
|
||||
llinfos << "LLPanelGroups::info" << llendl;
|
||||
LLCtrlListInterface *group_list = childGetListInterface("group list");
|
||||
LLUUID group_id;
|
||||
if (group_list && (group_id = group_list->getCurrentID()).notNull())
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroups::startIM()
|
||||
{
|
||||
//llinfos << "LLPanelFriends::onClickIM()" << llendl;
|
||||
LLCtrlListInterface *group_list = childGetListInterface("group list");
|
||||
LLUUID group_id;
|
||||
|
||||
if (group_list && (group_id = group_list->getCurrentID()).notNull())
|
||||
{
|
||||
LLGroupData group_data;
|
||||
if (gAgent.getGroupData(group_id, group_data))
|
||||
{
|
||||
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
|
||||
if (!tear_off)
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
gIMMgr->addSession(
|
||||
group_data.mName,
|
||||
IM_SESSION_GROUP_START,
|
||||
group_id);
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
else
|
||||
{
|
||||
// this should never happen, as starting a group IM session
|
||||
// relies on you belonging to the group and hence having the group data
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroups::leave()
|
||||
{
|
||||
llinfos << "LLPanelGroups::leave" << llendl;
|
||||
LLCtrlListInterface *group_list = childGetListInterface("group list");
|
||||
LLUUID group_id;
|
||||
if (group_list && (group_id = group_list->getCurrentID()).notNull())
|
||||
{
|
||||
S32 count = gAgent.mGroups.count();
|
||||
S32 i;
|
||||
for(i = 0; i < count; ++i)
|
||||
{
|
||||
if(gAgent.mGroups.get(i).mID == group_id)
|
||||
break;
|
||||
}
|
||||
if(i < count)
|
||||
{
|
||||
LLSD args;
|
||||
args["GROUP"] = gAgent.mGroups.get(i).mName;
|
||||
LLSD payload;
|
||||
payload["group_id"] = group_id;
|
||||
LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, callbackLeaveGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroups::search()
|
||||
{
|
||||
LLFloaterDirectory::showGroups();
|
||||
}
|
||||
|
||||
void LLPanelGroups::invite()
|
||||
{
|
||||
LLCtrlListInterface *group_list = childGetListInterface("group list");
|
||||
@@ -448,31 +313,6 @@ void LLPanelGroups::invite()
|
||||
LLFloaterGroupInvite::showForGroup(group_id);
|
||||
}
|
||||
|
||||
void LLPanelGroups::titles()
|
||||
{
|
||||
HBFloaterGroupTitles::toggle();
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
bool LLPanelGroups::callbackLeaveGroup(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
LLUUID group_id = notification["payload"]["group_id"].asUUID();
|
||||
if(option == 0)
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_LeaveGroupRequest);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->nextBlockFast(_PREHASH_GroupData);
|
||||
msg->addUUIDFast(_PREHASH_GroupID, group_id);
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLPanelGroups::onGroupSortChanged()
|
||||
{
|
||||
LLScrollListCtrl *group_list = getChild<LLScrollListCtrl>("group list");
|
||||
|
||||
@@ -52,7 +52,6 @@ class LLUICtrl;
|
||||
class LLTextBox;
|
||||
class LLScrollListCtrl;
|
||||
class LLButton;
|
||||
class LLFloaterGroupPicker;
|
||||
|
||||
class LLFloaterGroupPicker : public LLFloater, public LLUIFactory<LLFloaterGroupPicker, LLFloaterGroupPicker, VisibilityPolicy<LLFloater> >
|
||||
{
|
||||
@@ -105,29 +104,8 @@ protected:
|
||||
|
||||
void onGroupSortChanged();
|
||||
void onGroupList();
|
||||
static void onBtnCreate(void* userdata);
|
||||
static void onBtnActivate(void* userdata);
|
||||
static void onBtnInfo(void* userdata);
|
||||
static void onBtnIM(void* userdata);
|
||||
static void onBtnLeave(void* userdata);
|
||||
static void onBtnSearch(void* userdata);
|
||||
static void onBtnVote(void* userdata);
|
||||
static void onBtnInvite(void* userdata);
|
||||
static void onBtnTitles(void* userdata);
|
||||
static void onDoubleClickGroup(void* userdata);
|
||||
|
||||
void create();
|
||||
void activate();
|
||||
void info();
|
||||
void startIM();
|
||||
void leave();
|
||||
void search();
|
||||
void callVote();
|
||||
void invite();
|
||||
void titles();
|
||||
|
||||
static bool callbackLeaveGroup(const LLSD& notification, const LLSD& response);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
|
||||
#include "llavataractions.h"
|
||||
#include "llfloaterinspect.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "llcachename.h"
|
||||
@@ -39,7 +40,6 @@
|
||||
#include "llselectmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
@@ -123,7 +123,7 @@ void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
|
||||
LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
|
||||
if(node)
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(node->mPermissions->getCreator());
|
||||
LLAvatarActions::showProfile(node->mPermissions->getCreator());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,10 +153,10 @@ void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(owner_id);
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// LLFloaterAvatarInfo::showFromDirectory(owner_id);
|
||||
// LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,17 +47,18 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentaccess.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarconstants.h" //For new Online check - HgB
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterauction.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloaterscriptlimits.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llnotify.h"
|
||||
@@ -848,8 +849,7 @@ void LLPanelLandGeneral::onClickInfoGroup(void* userdata)
|
||||
LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)userdata;
|
||||
LLParcel* parcel = panelp->mParcel->getParcel();
|
||||
if (!parcel) return;
|
||||
LLUUID id = parcel->getGroupID();
|
||||
if(id.notNull())LLFloaterGroupInfo::showFromUUID(parcel->getGroupID());
|
||||
LLGroupActions::show(parcel->getGroupID());
|
||||
}
|
||||
|
||||
void LLPanelLandGeneral::onClickProfile()
|
||||
@@ -859,13 +859,11 @@ void LLPanelLandGeneral::onClickProfile()
|
||||
|
||||
if (parcel->getIsGroupOwned())
|
||||
{
|
||||
const LLUUID& group_id = parcel->getGroupID();
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
LLGroupActions::show(parcel->getGroupID());
|
||||
}
|
||||
else
|
||||
{
|
||||
const LLUUID& avatar_id = parcel->getOwnerID();
|
||||
LLFloaterAvatarInfo::showFromObject(avatar_id);
|
||||
LLAvatarActions::showProfile(parcel->getOwnerID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1179,11 +1177,11 @@ void LLPanelLandObjects::onDoubleClickOwner(void *userdata)
|
||||
BOOL is_group = cell->getValue().asString() == OWNER_GROUP;
|
||||
if (is_group)
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(owner_id);
|
||||
LLGroupActions::show(owner_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(owner_id);
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llproductinforequest.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llstatusbar.h"
|
||||
@@ -103,7 +103,7 @@ BOOL LLFloaterLandHoldings::postBuild()
|
||||
LLScrollListCtrl *grant_list = getChild<LLScrollListCtrl>("grant list");
|
||||
|
||||
// Grant list
|
||||
grant_list->setDoubleClickCallback(boost::bind(&LLFloaterLandHoldings::onGrantList,this));
|
||||
grant_list->setDoubleClickCallback(boost::bind(LLGroupActions::show, boost::bind(&LLScrollListCtrl::getCurrentID, grant_list)));
|
||||
|
||||
LLCtrlListInterface *list = grant_list->getListInterface();
|
||||
if (!list) return TRUE;
|
||||
@@ -323,19 +323,6 @@ void LLFloaterLandHoldings::onClickMap(void* data)
|
||||
self->buttonCore(1);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterLandHoldings::onGrantList(void* data)
|
||||
{
|
||||
LLFloaterLandHoldings* self = (LLFloaterLandHoldings*)data;
|
||||
LLCtrlSelectionInterface *list = self->childGetSelectionInterface("grant list");
|
||||
if (!list) return;
|
||||
LLUUID group_id = list->getCurrentID();
|
||||
if (group_id.notNull())
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterLandHoldings::refreshAggregates()
|
||||
{
|
||||
S32 allowed_area = gStatusBar->getSquareMetersCredit();
|
||||
|
||||
@@ -60,8 +60,6 @@ public:
|
||||
static void onClickMap(void*);
|
||||
static void onClickLandmark(void*);
|
||||
|
||||
static void onGrantList(void* data);
|
||||
|
||||
protected:
|
||||
LLFloaterLandHoldings();
|
||||
virtual ~LLFloaterLandHoldings();
|
||||
|
||||
@@ -35,17 +35,16 @@
|
||||
#include "llfloaterobjectiminfo.h"
|
||||
|
||||
#include "llagentdata.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llcachename.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "llfloater.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llsdutil.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llurldispatcher.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
// [RLVa:KB] - Version: 1.23.4
|
||||
#include "rlvhandler.h"
|
||||
@@ -147,14 +146,14 @@ void LLFloaterObjectIMInfo::onClickOwner(void* data)
|
||||
LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data;
|
||||
if (self->mOwnerIsGroup)
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(self->mOwnerID);
|
||||
LLGroupActions::show(self->mOwnerID);
|
||||
}
|
||||
// else
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g
|
||||
else if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (!RlvUtil::isNearbyAgent(self->mOwnerID)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromObject(self->mOwnerID);
|
||||
LLAvatarActions::showProfile(self->mOwnerID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,18 +41,19 @@
|
||||
#include "llinventorydefines.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventoryobserver.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llresmgr.h"
|
||||
#include "roles_constants.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
@@ -593,10 +594,7 @@ void LLFloaterProperties::onClickCreator()
|
||||
{
|
||||
LLInventoryItem* item = findItem();
|
||||
if(!item) return;
|
||||
if(!item->getCreatorUUID().isNull())
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromObject(item->getCreatorUUID());
|
||||
}
|
||||
LLAvatarActions::showProfile(item->getCreatorUUID());
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -606,16 +604,15 @@ void LLFloaterProperties::onClickOwner()
|
||||
if(!item) return;
|
||||
if(item->getPermissions().isGroupOwned())
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(item->getPermissions().getGroup());
|
||||
LLGroupActions::show(item->getPermissions().getGroup());
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(!item->getPermissions().getOwner().isNull())
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if ( (!item->getPermissions().getOwner().isNull()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromObject(item->getPermissions().getOwner());
|
||||
LLAvatarActions::showProfile(item->getPermissions().getOwner());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -970,7 +967,7 @@ void LLFloaterProperties::dirtyAll()
|
||||
/// LLMultiProperties
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLMultiProperties::LLMultiProperties(const LLRect &rect) : LLMultiFloater(std::string("Properties"), rect)
|
||||
LLMultiProperties::LLMultiProperties(const LLRect &rect) : LLMultiFloater(LLTrans::getString("MultiPropertiesTitle"), rect)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
#include "llfontgl.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llbutton.h"
|
||||
#include "llfloatergodtools.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llparcel.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
@@ -481,8 +481,7 @@ void LLFloaterTopObjects::onProfile(void* data)
|
||||
if (!list) return;
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
LLUUID taskid = first_selected->getUUID();
|
||||
LLFloaterAvatarInfo::showFromDirectory(taskid);
|
||||
LLAvatarActions::showProfile(first_selected->getUUID());
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onKickBtn(void* data)
|
||||
|
||||
@@ -320,6 +320,20 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im
|
||||
{
|
||||
gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2010-05-26 (RLVa-1.2.2a) | Modified: RLVa-1.2.0h
|
||||
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(to_agent)) &&
|
||||
(!RlvUIEnabler::hasOpenProfile(to_agent)) )
|
||||
{
|
||||
// Log to chat history if the user didn't drop on an IM session or a profile to avoid revealing the name of the recipient
|
||||
std::string strMsgName = "inventory_item_offered"; LLSD args; LLAvatarName avName;
|
||||
if (LLAvatarNameCache::get(to_agent, &avName))
|
||||
{
|
||||
args["NAME"] = RlvStrings::getAnonym(avName);
|
||||
strMsgName = "inventory_item_offered_rlv";
|
||||
}
|
||||
gIMMgr->addSystemMessage(LLUUID::null, strMsgName, args);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat.
|
||||
else if (gIMMgr->isIMSessionOpen(session_id))
|
||||
{
|
||||
|
||||
@@ -347,17 +347,15 @@ void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id,
|
||||
const std::string& full_name,
|
||||
bool is_group)
|
||||
{
|
||||
if (is_group)
|
||||
if (LLView* view = findChild<LLView>("payee_group"))
|
||||
{
|
||||
childSetVisible("payee_group",true);
|
||||
childSetVisible("payee_resident",false);
|
||||
view->setVisible(is_group);
|
||||
}
|
||||
else
|
||||
if (LLView* view = findChild<LLView>("payee_resident"))
|
||||
{
|
||||
childSetVisible("payee_group",false);
|
||||
childSetVisible("payee_resident",true);
|
||||
view->setVisible(!is_group);
|
||||
}
|
||||
|
||||
|
||||
childSetTextArg("payee_name", "[NAME]", full_name);
|
||||
}
|
||||
|
||||
|
||||
505
indra/newview/llgroupactions.cpp
Normal file
505
indra/newview/llgroupactions.cpp
Normal file
@@ -0,0 +1,505 @@
|
||||
/**
|
||||
* @file llgroupactions.cpp
|
||||
* @brief Group-related actions (join, leave, new, delete, etc)
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llgroupactions.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "llfloaterchatterbox.h" // for LLFloaterMyFriends
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llgroupmgr.h"
|
||||
#include "llimview.h" // for gIMMgr
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanelgroup.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "groupchatlistener.h"
|
||||
#include "hippolimits.h" // for getMaxAgentGroups
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f)
|
||||
//#include "llslurl.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
static GroupChatListener sGroupChatListener;
|
||||
|
||||
class LLGroupHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// requires trusted browser to trigger
|
||||
LLGroupHandler() : LLCommandHandler("group", true/*UNTRUSTED_THROTTLE*/) { }
|
||||
bool handle(const LLSD& tokens, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
{
|
||||
/*if (!LLUI::sSettingGroups["config"]->getBOOL("EnableGroupInfo"))
|
||||
{
|
||||
LLNotificationsUtil::add("NoGroupInfo", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
|
||||
return true;
|
||||
}*/
|
||||
|
||||
if (tokens.size() < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tokens[0].asString() == "create")
|
||||
{
|
||||
LLGroupActions::createGroup();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tokens.size() < 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tokens[0].asString() == "list")
|
||||
{
|
||||
if (tokens[1].asString() == "show")
|
||||
{
|
||||
// CP_TODO: get the value we pass in via the XUI name
|
||||
// of the tab instead of using a literal like this
|
||||
LLFloaterMyFriends::showInstance( 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID group_id;
|
||||
if (!group_id.set(tokens[0], FALSE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tokens[1].asString() == "about")
|
||||
{
|
||||
if (group_id.isNull())
|
||||
return true;
|
||||
|
||||
LLGroupActions::show(group_id);
|
||||
|
||||
return true;
|
||||
}
|
||||
if (tokens[1].asString() == "inspect")
|
||||
{
|
||||
if (group_id.isNull())
|
||||
return true;
|
||||
LLGroupActions::inspect(group_id);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
LLGroupHandler gGroupHandler;
|
||||
|
||||
// static
|
||||
void LLGroupActions::search()
|
||||
{
|
||||
//LLFloaterReg::showInstance("search", LLSD().with("category", "groups"));
|
||||
LLFloaterDirectory::showGroups();
|
||||
}
|
||||
|
||||
/* Singu TODO: Voice refactor
|
||||
// static
|
||||
void LLGroupActions::startCall(const LLUUID& group_id)
|
||||
{
|
||||
// create a new group voice session
|
||||
LLGroupData gdata;
|
||||
|
||||
if (!gAgent.getGroupData(group_id, gdata))
|
||||
{
|
||||
llwarns << "Error getting group data" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(group_id)) && (!gIMMgr->hasSession(group_id)) )
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true);
|
||||
if (session_id.isNull())
|
||||
{
|
||||
llwarns << "Error adding session" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
// start the call
|
||||
gIMMgr->autoStartCallOnStartup(session_id);
|
||||
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
*/
|
||||
|
||||
// static
|
||||
void LLGroupActions::join(const LLUUID& group_id)
|
||||
{
|
||||
if (gAgent.mGroups.count() >= gHippoLimits->getMaxAgentGroups()) //!gAgent.canJoinGroups()
|
||||
{
|
||||
LLNotificationsUtil::add("JoinedTooManyGroups");
|
||||
return;
|
||||
}
|
||||
|
||||
LLGroupMgrGroupData* gdatap =
|
||||
LLGroupMgr::getInstance()->getGroupData(group_id);
|
||||
|
||||
if (gdatap)
|
||||
{
|
||||
S32 cost = gdatap->mMembershipFee;
|
||||
LLSD args;
|
||||
args["COST"] = llformat("%d", cost);
|
||||
args["NAME"] = gdatap->mName;
|
||||
LLSD payload;
|
||||
payload["group_id"] = group_id;
|
||||
|
||||
if (can_afford_transaction(cost))
|
||||
{
|
||||
if(cost > 0)
|
||||
LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, onJoinGroup);
|
||||
else
|
||||
LLNotificationsUtil::add("JoinGroupNoCost", args, payload, onJoinGroup);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("JoinGroupCannotAfford", args, payload);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "LLGroupMgr::getInstance()->getGroupData(" << group_id
|
||||
<< ") was NULL" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLGroupActions::onJoinGroup(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
if (option == 1)
|
||||
{
|
||||
// user clicked cancel
|
||||
return false;
|
||||
}
|
||||
|
||||
LLGroupMgr::getInstance()->
|
||||
sendGroupMemberJoin(notification["payload"]["group_id"].asUUID());
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLGroupActions::leave(const LLUUID& group_id)
|
||||
{
|
||||
// if (group_id.isNull())
|
||||
// return;
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
|
||||
if ( (group_id.isNull()) || ((gAgent.getGroupID() == group_id) && (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP))) )
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
|
||||
S32 count = gAgent.mGroups.count();
|
||||
S32 i;
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
if(gAgent.mGroups.get(i).mID == group_id)
|
||||
break;
|
||||
}
|
||||
if (i < count)
|
||||
{
|
||||
LLSD args;
|
||||
args["GROUP"] = gAgent.mGroups.get(i).mName;
|
||||
LLSD payload;
|
||||
payload["group_id"] = group_id;
|
||||
LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLGroupActions::activate(const LLUUID& group_id)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)) && (gRlvHandler.getAgentGroup() != group_id) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_ActivateGroup);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_GroupID, group_id);
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
||||
/* Singu Note: this function serves no purpose to us, it is here as an honorable mention
|
||||
static bool isGroupUIVisible()
|
||||
{
|
||||
static LLPanel* panel = 0;
|
||||
if(!panel)
|
||||
panel = LLFloaterSidePanelContainer::getPanel("people", "panel_group_info_sidetray");
|
||||
if(!panel)
|
||||
return false;
|
||||
return panel->isInVisibleChain();
|
||||
}
|
||||
*/
|
||||
|
||||
// static
|
||||
void LLGroupActions::inspect(const LLUUID& group_id)
|
||||
{
|
||||
//LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", group_id));
|
||||
openGroupProfile(group_id);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLGroupActions::show(const LLUUID& group_id)
|
||||
{
|
||||
if (group_id.isNull())
|
||||
return;
|
||||
|
||||
/*
|
||||
LLSD params;
|
||||
params["group_id"] = group_id;
|
||||
params["open_tab_name"] = "panel_group_info_sidetray";
|
||||
|
||||
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
|
||||
*/
|
||||
openGroupProfile(group_id);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLGroupActions::showTab(const LLUUID& group_id, const std::string& tab_name)
|
||||
{
|
||||
if (group_id.isNull()) return;
|
||||
|
||||
openGroupProfile(group_id)->selectTabByName(tab_name);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLGroupActions::showNotice(const std::string& subj, const std::string& mes, const LLUUID& group_id, const bool& has_inventory, const std::string& item_name, LLOfferInfo* info)
|
||||
{
|
||||
if (LLFloaterGroupInfo* fgi = LLFloaterGroupInfo::getInstance(group_id))
|
||||
{
|
||||
fgi->mPanelGroupp->showNotice(subj, mes, has_inventory, item_name, info);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We need to clean up that inventory offer.
|
||||
if (info)
|
||||
{
|
||||
info->forceResponse(IOR_DECLINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Singu Note: How could this ever work with a null id, it's only used by llnotificationgrouphandler.cpp which we don't have
|
||||
void LLGroupActions::refresh_notices()
|
||||
{
|
||||
if(!isGroupUIVisible())
|
||||
return;
|
||||
|
||||
LLSD params;
|
||||
params["group_id"] = LLUUID::null;
|
||||
params["open_tab_name"] = "panel_group_info_sidetray";
|
||||
params["action"] = "refresh_notices";
|
||||
|
||||
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
|
||||
}
|
||||
*/
|
||||
|
||||
//static
|
||||
void LLGroupActions::refresh(const LLUUID& group_id)
|
||||
{
|
||||
/*
|
||||
if(!isGroupUIVisible())
|
||||
return;
|
||||
|
||||
LLSD params;
|
||||
params["group_id"] = group_id;
|
||||
params["open_tab_name"] = "panel_group_info_sidetray";
|
||||
params["action"] = "refresh";
|
||||
|
||||
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
|
||||
*/
|
||||
if (LLFloaterGroupInfo* fgi = LLFloaterGroupInfo::getInstance(group_id))
|
||||
if (LLPanelGroup* pg = fgi->mPanelGroupp)
|
||||
pg->refreshData();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLGroupActions::createGroup()
|
||||
{
|
||||
/*
|
||||
LLSD params;
|
||||
params["group_id"] = LLUUID::null;
|
||||
params["open_tab_name"] = "panel_group_info_sidetray";
|
||||
params["action"] = "create";
|
||||
|
||||
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
|
||||
*/
|
||||
openGroupProfile(LLUUID::null);
|
||||
}
|
||||
//static
|
||||
void LLGroupActions::closeGroup(const LLUUID& group_id)
|
||||
{
|
||||
/*
|
||||
if(!isGroupUIVisible())
|
||||
return;
|
||||
|
||||
LLSD params;
|
||||
params["group_id"] = group_id;
|
||||
params["open_tab_name"] = "panel_group_info_sidetray";
|
||||
params["action"] = "close";
|
||||
|
||||
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
|
||||
*/
|
||||
if (LLFloaterGroupInfo* fgi = LLFloaterGroupInfo::getInstance(group_id))
|
||||
fgi->close();
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
LLUUID LLGroupActions::startIM(const LLUUID& group_id)
|
||||
{
|
||||
if (group_id.isNull()) return LLUUID::null;
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(group_id)) && (!gIMMgr->hasSession(group_id)) )
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", group_id/*LLSLURL("group", group_id, "about").getSLURLString()*/));
|
||||
return LLUUID::null;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLGroupData group_data;
|
||||
if (gAgent.getGroupData(group_id, group_data))
|
||||
{
|
||||
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
|
||||
if (!tear_off) gIMMgr->setFloaterOpen(TRUE);
|
||||
LLUUID session_id = gIMMgr->addSession(
|
||||
group_data.mName,
|
||||
IM_SESSION_GROUP_START,
|
||||
group_id);
|
||||
make_ui_sound("UISndStartIM");
|
||||
return session_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// this should never happen, as starting a group IM session
|
||||
// relies on you belonging to the group and hence having the group data
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
return LLUUID::null;
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLGroupActions::endIM(const LLUUID& group_id)
|
||||
{
|
||||
if (group_id.isNull())
|
||||
return;
|
||||
|
||||
LLUUID session_id = gIMMgr->computeSessionID(IM_SESSION_GROUP_START, group_id);
|
||||
if (session_id.notNull())
|
||||
{
|
||||
gIMMgr->removeSession(session_id);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLGroupActions::isInGroup(const LLUUID& group_id)
|
||||
{
|
||||
// *TODO: Move all the LLAgent group stuff into another class, such as
|
||||
// this one.
|
||||
return gAgent.isInGroup(group_id);
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLGroupActions::isAvatarMemberOfGroup(const LLUUID& group_id, const LLUUID& avatar_id)
|
||||
{
|
||||
if(group_id.isNull() || avatar_id.isNull())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(group_id);
|
||||
if(!group_data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(group_data->mMembers.end() == group_data->mMembers.find(avatar_id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//-- Private methods ----------------------------------------------------------
|
||||
|
||||
// static
|
||||
bool LLGroupActions::onLeaveGroup(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLUUID group_id = notification["payload"]["group_id"].asUUID();
|
||||
if(option == 0)
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_LeaveGroupRequest);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->nextBlockFast(_PREHASH_GroupData);
|
||||
msg->addUUIDFast(_PREHASH_GroupID, group_id);
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Singu helper function, open a profile and center it
|
||||
// static
|
||||
LLFloaterGroupInfo* LLGroupActions::openGroupProfile(const LLUUID& group_id)
|
||||
{
|
||||
LLFloaterGroupInfo* fgi = LLFloaterGroupInfo::getInstance(group_id);
|
||||
if (!fgi) fgi = new LLFloaterGroupInfo(group_id);
|
||||
fgi->center();
|
||||
fgi->open();
|
||||
return fgi;
|
||||
}
|
||||
|
||||
131
indra/newview/llgroupactions.h
Normal file
131
indra/newview/llgroupactions.h
Normal file
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* @file llgroupactions.h
|
||||
* @brief Group-related actions (join, leave, new, delete, etc)
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLGROUPACTIONS_H
|
||||
#define LL_LLGROUPACTIONS_H
|
||||
|
||||
class LLFloaterGroupInfo;
|
||||
class LLOfferInfo;
|
||||
|
||||
/**
|
||||
* Group-related actions (join, leave, new, delete, etc)
|
||||
*/
|
||||
class LLGroupActions
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Invokes group search floater.
|
||||
*/
|
||||
static void search();
|
||||
|
||||
/// Join a group. Assumes LLGroupMgr has data for that group already.
|
||||
static void join(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Invokes "Leave Group" floater.
|
||||
*/
|
||||
static void leave(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Activate group.
|
||||
*/
|
||||
static void activate(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Show group information panel.
|
||||
*/
|
||||
static void show(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Show group information panel, with specific tab open.
|
||||
*/
|
||||
static void showTab(const LLUUID& group_id, const std::string& tab_name);
|
||||
|
||||
/**
|
||||
* Show group notice that has come in.
|
||||
*/
|
||||
static void showNotice(const std::string& subj, const std::string& mes, const LLUUID& group_id, const bool& has_inventory, const std::string& item_name, LLOfferInfo* info);
|
||||
|
||||
/**
|
||||
* Show group inspector floater.
|
||||
*/
|
||||
static void inspect(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Refresh group information panel.
|
||||
*/
|
||||
static void refresh(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Refresh group notices panel.
|
||||
*/
|
||||
static void refresh_notices();
|
||||
|
||||
/**
|
||||
* Refresh group information panel.
|
||||
*/
|
||||
static void createGroup();
|
||||
|
||||
/**
|
||||
* Close group information panel.
|
||||
*/
|
||||
static void closeGroup(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Start group instant messaging session.
|
||||
*/
|
||||
static LLUUID startIM(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* End group instant messaging session.
|
||||
*/
|
||||
static void endIM(const LLUUID& group_id);
|
||||
|
||||
/// Returns if the current user is a member of the group
|
||||
static bool isInGroup(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Start a group voice call.
|
||||
*/
|
||||
static void startCall(const LLUUID& group_id);
|
||||
|
||||
/**
|
||||
* Returns true if avatar is in group.
|
||||
*
|
||||
* Note that data about group members is loaded from server.
|
||||
* If data has not been loaded yet, function will return inaccurate result.
|
||||
* See LLGroupMgr::sendGroupMembersRequest
|
||||
*/
|
||||
static bool isAvatarMemberOfGroup(const LLUUID& group_id, const LLUUID& avatar_id);
|
||||
|
||||
private:
|
||||
static bool onJoinGroup(const LLSD& notification, const LLSD& response);
|
||||
static bool onLeaveGroup(const LLSD& notification, const LLSD& response);
|
||||
static LLFloaterGroupInfo* openGroupProfile(const LLUUID& group_id);
|
||||
};
|
||||
|
||||
#endif // LL_LLGROUPACTIONS_H
|
||||
|
||||
@@ -44,11 +44,10 @@
|
||||
#include "lltransactiontypes.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "lleconomy.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lltrans.h"
|
||||
@@ -1361,7 +1360,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data
|
||||
// If we had a failure, the group panel needs to be updated.
|
||||
if (!success)
|
||||
{
|
||||
LLFloaterGroupInfo::refreshGroup(group_id);
|
||||
LLGroupActions::refresh(group_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1381,7 +1380,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
|
||||
|
||||
LLGroupMgr::getInstance()->clearGroupData(group_id);
|
||||
// refresh the floater for this group, if any.
|
||||
LLFloaterGroupInfo::refreshGroup(group_id);
|
||||
LLGroupActions::refresh(group_id);
|
||||
// refresh the group panel of the search window, if necessary.
|
||||
LLFloaterDirectory::refreshGroup(group_id);
|
||||
}
|
||||
@@ -1403,7 +1402,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
|
||||
|
||||
LLGroupMgr::getInstance()->clearGroupData(group_id);
|
||||
// close the floater for this group, if any.
|
||||
LLFloaterGroupInfo::closeGroup(group_id);
|
||||
LLGroupActions::closeGroup(group_id);
|
||||
// refresh the group panel of the search window, if necessary.
|
||||
LLFloaterDirectory::refreshGroup(group_id);
|
||||
}
|
||||
@@ -1439,8 +1438,8 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
|
||||
|
||||
gAgent.mGroups.push_back(gd);
|
||||
|
||||
LLFloaterGroupInfo::closeCreateGroup();
|
||||
LLFloaterGroupInfo::showFromUUID(group_id,"roles_tab");
|
||||
LLGroupActions::closeGroup(LLUUID::null);
|
||||
LLGroupActions::showTab(group_id, "roles_tab");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
#include "llbutton.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llfloaterchat.h" // for add_chat_history()
|
||||
#include "llgroupactions.h"
|
||||
#include "llnotify.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "llui.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventory.h"
|
||||
#include "lltrans.h"
|
||||
@@ -279,7 +279,7 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject,
|
||||
wide_btn_width,
|
||||
BTN_HEIGHT);
|
||||
|
||||
btn = new LLButton(LLTrans::getString("GroupNotifyGroupNotices"), btn_rect, LLStringUtil::null, boost::bind(&LLGroupNotifyBox::onClickGroupInfo,this));
|
||||
btn = new LLButton(LLTrans::getString("GroupNotifyGroupNotices"), btn_rect, LLStringUtil::null, boost::bind(LLGroupActions::showTab, mGroupID, "notices_tab"));
|
||||
btn->setToolTip(LLTrans::getString("GroupNotifyViewPastNotices"));
|
||||
addChild(btn, -1);
|
||||
|
||||
@@ -457,12 +457,6 @@ void LLGroupNotifyBox::onClickOk()
|
||||
close();
|
||||
}
|
||||
|
||||
void LLGroupNotifyBox::onClickGroupInfo()
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(mGroupID, "notices_tab");
|
||||
//Leave notice open until explicitly closed
|
||||
}
|
||||
|
||||
void LLGroupNotifyBox::onClickSaveInventory()
|
||||
{
|
||||
mInventoryOffer->forceResponse(IOR_ACCEPT);
|
||||
|
||||
@@ -90,7 +90,6 @@ protected:
|
||||
|
||||
// internal handler for button being clicked
|
||||
void onClickOk();
|
||||
void onClickGroupInfo();
|
||||
void onClickSaveInventory();
|
||||
|
||||
// for "next" button
|
||||
|
||||
@@ -45,13 +45,13 @@
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llchat.h"
|
||||
#include "llconsole.h"
|
||||
#include "llfloater.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llimview.h"
|
||||
@@ -1358,13 +1358,13 @@ BOOL LLFloaterIMPanel::postBuild()
|
||||
|
||||
if (LLButton* btn = findChild<LLButton>("profile_callee_btn"))
|
||||
{
|
||||
btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickProfile, this));
|
||||
btn->setCommitCallback(boost::bind(LLAvatarActions::showProfile, mOtherParticipantUUID));
|
||||
if (!mProfileButtonEnabled) btn->setEnabled(false);
|
||||
}
|
||||
if (LLButton* btn = findChild<LLButton>("profile_tele_btn"))
|
||||
btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickTeleport, this));
|
||||
btn->setCommitCallback(boost::bind(static_cast<void(*)(const LLUUID&)>(LLAvatarActions::offerTeleport), mOtherParticipantUUID));
|
||||
if (LLButton* btn = findChild<LLButton>("group_info_btn"))
|
||||
btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickGroupInfo, this));
|
||||
btn->setCommitCallback(boost::bind(LLGroupActions::show, mSessionUUID));
|
||||
childSetAction("history_btn", onClickHistory, this);
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("rp_mode"))
|
||||
ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onRPMode, this, _2));
|
||||
@@ -1375,9 +1375,6 @@ BOOL LLFloaterIMPanel::postBuild()
|
||||
if (LLButton* btn = findChild<LLButton>("toggle_active_speakers_btn"))
|
||||
btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickToggleActiveSpeakers, this, _2));
|
||||
|
||||
//LLButton* close_btn = getChild<LLButton>("close_btn");
|
||||
//close_btn->setClickedCallback(&LLFloaterIMPanel::onClickClose, this);
|
||||
|
||||
mHistoryEditor = getChild<LLViewerTextEditor>("im_history");
|
||||
mHistoryEditor->setParseHTML(TRUE);
|
||||
mHistoryEditor->setParseHighlights(TRUE);
|
||||
@@ -1876,25 +1873,6 @@ void LLFloaterIMPanel::onTabClick(void* userdata)
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterIMPanel::onClickProfile()
|
||||
{
|
||||
// Bring up the Profile window
|
||||
if (mOtherParticipantUUID.notNull())
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(mOtherParticipantUUID);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onClickTeleport()
|
||||
{
|
||||
if (mOtherParticipantUUID.notNull())
|
||||
{
|
||||
handle_lure(mOtherParticipantUUID);
|
||||
//do a teleport to other part id
|
||||
//LLFloaterAvatarInfo::showFromDirectory(mOtherParticipantID);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onRPMode(const LLSD& value)
|
||||
{
|
||||
mRPMode = value.asBoolean();
|
||||
@@ -1919,22 +1897,6 @@ void LLFloaterIMPanel::onClickHistory( void* userdata )
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onClickGroupInfo()
|
||||
{
|
||||
// Bring up the Profile window
|
||||
LLFloaterGroupInfo::showFromUUID(mSessionUUID);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMPanel::onClickClose( void* userdata )
|
||||
{
|
||||
LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
|
||||
if(self)
|
||||
{
|
||||
self->close();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMPanel::onClickStartCall(void* userdata)
|
||||
{
|
||||
|
||||
@@ -239,12 +239,8 @@ public:
|
||||
void onInputEditorKeystroke(LLLineEditor* caller);
|
||||
static void onTabClick( void* userdata );
|
||||
|
||||
void onClickProfile();
|
||||
static void onClickHistory( void* userdata );
|
||||
void onRPMode(const LLSD& value);
|
||||
void onClickTeleport();
|
||||
void onClickGroupInfo();
|
||||
static void onClickClose( void* userdata );
|
||||
static void onClickStartCall( void* userdata );
|
||||
static void onClickEndCall( void* userdata );
|
||||
void onClickToggleActiveSpeakers(const LLSD& value);
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
#include "llfontgl.h"
|
||||
#include "llrect.h"
|
||||
#include "llerror.h"
|
||||
#include "llbutton.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llsdutil_math.h"
|
||||
@@ -46,6 +45,7 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llchat.h"
|
||||
#include "llresmgr.h"
|
||||
@@ -53,25 +53,16 @@
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llhttpnode.h"
|
||||
#include "llimpanel.h"
|
||||
#include "llresizebar.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llfloater.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llresizehandle.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "llui.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "lltoolbar.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llnotify.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
#include "llfirstuse.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
@@ -402,7 +393,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
|
||||
EInstantMessage LLIMMgr::defaultIMTypeForAgent(const LLUUID& agent_id)
|
||||
{
|
||||
EInstantMessage type = IM_NOTHING_SPECIAL;
|
||||
if(is_agent_friend(agent_id))
|
||||
if (LLAvatarActions::isFriend(agent_id))
|
||||
{
|
||||
if(LLAvatarTracker::instance().isBuddyOnline(agent_id))
|
||||
{
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
#include "llagentwearables.h"
|
||||
#include "llappearancemgr.h"
|
||||
#include "llattachmentsmgr.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfloateropenobject.h"
|
||||
@@ -2896,7 +2896,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
|
||||
restoreItem();
|
||||
return;
|
||||
}
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
#ifdef DELETE_SYSTEM_FOLDERS
|
||||
else if ("delete_system_folder" == action)
|
||||
{
|
||||
removeSystemFolder();
|
||||
@@ -3455,7 +3455,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags)
|
||||
mDisabledItems.push_back(std::string("Delete"));
|
||||
}
|
||||
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
#ifdef DELETE_SYSTEM_FOLDERS
|
||||
if (LLFolderType::lookupIsProtectedType(type))
|
||||
{
|
||||
mItems.push_back(std::string("Delete System Folder"));
|
||||
@@ -4730,7 +4730,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
|
||||
LLInventoryItem* item = getItem();
|
||||
BOOL good_card = (item
|
||||
&& (LLUUID::null != item->getCreatorUUID())
|
||||
&& (item->getCreatorUUID().notNull())
|
||||
&& (item->getCreatorUUID() != gAgent.getID()));
|
||||
BOOL user_online = FALSE;
|
||||
if (item)
|
||||
@@ -6441,10 +6441,9 @@ public:
|
||||
virtual void doIt()
|
||||
{
|
||||
LLViewerInventoryItem* item = getItem();
|
||||
if (item && item->getCreatorUUID().notNull())
|
||||
if (item)
|
||||
{
|
||||
bool online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
|
||||
LLFloaterAvatarInfo::showFromFriend(item->getCreatorUUID(), online);
|
||||
LLAvatarActions::showProfile(item->getCreatorUUID());
|
||||
}
|
||||
LLInvFVBridgeAction::doIt();
|
||||
}
|
||||
|
||||
@@ -409,10 +409,12 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
|
||||
|
||||
const LLFolderType::EType folder_type = category->getPreferredType();
|
||||
|
||||
#ifndef DELETE_SYSTEM_FOLDERS
|
||||
if (LLFolderType::lookupIsProtectedType(folder_type))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Can't delete the outfit that is currently being worn.
|
||||
if (folder_type == LLFolderType::FT_OUTFIT)
|
||||
|
||||
@@ -78,12 +78,6 @@ void handle_track_avatar(const LLUUID& agent_id, const std::string& name)
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
|
||||
void handle_pay_by_id(const LLUUID& agent_id)
|
||||
{
|
||||
const BOOL is_group = FALSE;
|
||||
LLFloaterPay::payDirectly(&give_money, agent_id, is_group);
|
||||
}
|
||||
|
||||
void handle_mouselook(void*)
|
||||
{
|
||||
gAgentCamera.changeCameraToMouselook();
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
class LLUUID;
|
||||
|
||||
void handle_track_avatar(const LLUUID& agent_id, const std::string& name);
|
||||
void handle_pay_by_id(const LLUUID& agent_id);
|
||||
void handle_mouselook(void*);
|
||||
void handle_map(void*);
|
||||
void handle_mini_map(void*);
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "llnetmap.h"
|
||||
|
||||
#include "indra_constants.h"
|
||||
#include "llui.h"
|
||||
#include "llmath.h" // clampf()
|
||||
#include "llfocusmgr.h"
|
||||
#include "lllocalcliprect.h"
|
||||
@@ -46,11 +44,10 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcolorscheme.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llframetimer.h"
|
||||
#include "lltracker.h"
|
||||
@@ -58,7 +55,6 @@
|
||||
#include "llsurface.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lluuid.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llviewermenu.h"
|
||||
@@ -432,7 +428,7 @@ void LLNetMap::draw()
|
||||
avColor = em_color;
|
||||
}
|
||||
//without these dots, SL would suck.
|
||||
else if(is_agent_friend(id))
|
||||
else if(LLAvatarActions::isFriend(id))
|
||||
{
|
||||
avColor = friend_color;
|
||||
}
|
||||
@@ -1150,10 +1146,10 @@ bool LLNetMap::LLShowAgentProfile::handleEvent(LLPointer<LLEvent> event, const L
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
LLFloaterAvatarInfo::show(self->mClosestAgentAtLastRightClick);
|
||||
LLAvatarActions::showProfile(self->mClosestAgentAtLastRightClick);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
//LLFloaterAvatarInfo::show(self->mClosestAgentAtLastRightClick);
|
||||
//LLAvatarActions::showProfile(self->mClosestAgentAtLastRightClick);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,74 +34,48 @@
|
||||
|
||||
#include "llpanelavatar.h"
|
||||
|
||||
#include "llclassifiedflags.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llcachename.h"
|
||||
|
||||
#include "llavatarconstants.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llfloater.h"
|
||||
#include "llclassifiedflags.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llwindow.h"
|
||||
|
||||
#include "llfloaterfriends.h"
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "lldroptarget.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llnameeditor.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanelclassified.h"
|
||||
#include "llpanelpick.h"
|
||||
#include "llpreviewtexture.h"
|
||||
#include "llpluginclassmedia.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "llimview.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewergenericmessage.h" // send_generic_message
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llweb.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "roles_constants.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "lldroptarget.h"
|
||||
|
||||
#include "llviewerwindow.h"
|
||||
#include "llweb.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "llavatarname.h"
|
||||
|
||||
// Statics
|
||||
std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels;
|
||||
BOOL LLPanelAvatar::sAllowFirstLife = FALSE;
|
||||
|
||||
extern void callback_invite_to_group(LLUUID group_id, void *user_data);
|
||||
extern void handle_lure(const LLUUID& invitee);
|
||||
extern void handle_pay_by_id(const LLUUID& payee);
|
||||
BOOL is_agent_friend(const LLUUID& agent_id);
|
||||
BOOL is_agent_mappable(const LLUUID& agent_id);
|
||||
|
||||
|
||||
@@ -197,12 +171,6 @@ void LLPanelAvatarSecondLife::clearControls()
|
||||
{
|
||||
group_list->deleteAllItems();
|
||||
}
|
||||
/*LLScrollListCtrl* ratings_list = getChild<LLScrollListCtrl>("ratings"); createDummyWidget Making Dummy -HgB
|
||||
if(ratings_list)
|
||||
{
|
||||
ratings_list->deleteAllItems();
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
// virtual
|
||||
@@ -421,7 +389,7 @@ void LLPanelAvatarFirstLife::processProperties(void* data, EAvatarProcessorType
|
||||
void LLPanelAvatarSecondLife::onClickImage(void* data)
|
||||
{
|
||||
LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*)data;
|
||||
LLNameEditor* name_ctrl = self->getChild<LLNameEditor>("name");
|
||||
LLNameEditor* name_ctrl = self->getChild<LLNameEditor>("dnname");
|
||||
if(name_ctrl)
|
||||
{
|
||||
std::string name_text = name_ctrl->getText();
|
||||
@@ -463,18 +431,14 @@ void LLPanelAvatarSecondLife::onClickImage(void* data)
|
||||
void LLPanelAvatarSecondLife::onDoubleClickGroup(void* data)
|
||||
{
|
||||
LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*)data;
|
||||
|
||||
|
||||
LLScrollListCtrl* group_list = self->getChild<LLScrollListCtrl>("groups");
|
||||
if(group_list)
|
||||
{
|
||||
LLScrollListItem* item = group_list->getFirstSelected();
|
||||
|
||||
if(item && item->getUUID().notNull())
|
||||
if (item)
|
||||
{
|
||||
llinfos << "Show group info " << item->getUUID() << llendl;
|
||||
|
||||
LLFloaterGroupInfo::showFromUUID(item->getUUID());
|
||||
LLGroupActions::show(item->getUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -506,11 +470,7 @@ bool LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL(const LLSD& notification
|
||||
void LLPanelAvatarSecondLife::onClickPartnerInfo(void *data)
|
||||
{
|
||||
LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*) data;
|
||||
if (self->mPartnerID.notNull())
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromProfile(self->mPartnerID,
|
||||
self->calcScreenRect());
|
||||
}
|
||||
LLAvatarActions::showProfile(self->mPartnerID);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -542,8 +502,8 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
|
||||
childSetEnabled("partner_info", mPartnerID.notNull());
|
||||
|
||||
childSetAction("?",onClickPublishHelp,this);
|
||||
BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
|
||||
enableControls(own_avatar);
|
||||
LLPanelAvatar* pa = getPanelAvatar();
|
||||
enableControls(pa->getAvatarID() == gAgentID);
|
||||
|
||||
childSetVisible("About:",LLPanelAvatar::sAllowFirstLife);
|
||||
childSetVisible("(500 chars)",LLPanelAvatar::sAllowFirstLife);
|
||||
@@ -554,16 +514,15 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
|
||||
|
||||
childSetVisible("online_yes",FALSE);
|
||||
|
||||
childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar());
|
||||
childSetAction("Instant Message...", LLPanelAvatar::onClickIM, getPanelAvatar());
|
||||
childSetAction("GroupInvite_Button", LLPanelAvatar::onClickGroupInvite, getPanelAvatar());
|
||||
getChild<LLUICtrl>("Find on Map")->setCommitCallback(boost::bind(LLAvatarActions::showOnMap, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Instant Message...")->setCommitCallback(boost::bind(LLAvatarActions::startIM, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("GroupInvite_Button")->setCommitCallback(boost::bind(LLAvatarActions::inviteToGroup, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
|
||||
childSetAction("Add Friend...", LLPanelAvatar::onClickAddFriend, getPanelAvatar());
|
||||
childSetAction("Pay...", LLPanelAvatar::onClickPay, getPanelAvatar());
|
||||
childSetAction("Mute", LLPanelAvatar::onClickMute, getPanelAvatar() );
|
||||
getChild<LLUICtrl>("Add Friend...")->setCommitCallback(boost::bind(LLAvatarActions::requestFriendshipDialog, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
childSetAction("Mute", LLPanelAvatar::onClickMute, pa);
|
||||
|
||||
childSetAction("Offer Teleport...", LLPanelAvatar::onClickOfferTeleport,
|
||||
getPanelAvatar() );
|
||||
getChild<LLUICtrl>("Offer Teleport...")->setCommitCallback(boost::bind(static_cast<void(*)(const LLUUID&)>(LLAvatarActions::offerTeleport), boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
|
||||
getChild<LLScrollListCtrl>("groups")->setDoubleClickCallback(boost::bind(&LLPanelAvatarSecondLife::onDoubleClickGroup,this));
|
||||
|
||||
@@ -600,8 +559,6 @@ BOOL LLPanelAvatarWeb::postBuild(void)
|
||||
url_edit->setKeystrokeCallback(boost::bind(&LLPanelAvatarWeb::onURLKeystroke,this,_1));
|
||||
url_edit->setCommitCallback(boost::bind(&LLPanelAvatarWeb::onCommitURL,this,_2));
|
||||
|
||||
getChild<LLLineEditor>("load")->setCommitCallback(boost::bind(&LLPanelAvatarWeb::onCommitLoad,this,_2));
|
||||
|
||||
childSetAction("web_profile_help",onClickWebProfileHelp,this);
|
||||
|
||||
childSetControlName("auto_load","AutoLoadWebProfiles");
|
||||
@@ -621,7 +578,7 @@ void LLPanelAvatarWeb::processProperties(void* data, EAvatarProcessorType type)
|
||||
if(type == APT_PROPERTIES)
|
||||
{
|
||||
const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( data );
|
||||
if (pAvatarData && (mAvatarID == pAvatarData->avatar_id) && (pAvatarData->avatar_id != LLUUID::null))
|
||||
if (pAvatarData && (mAvatarID == pAvatarData->avatar_id) && (pAvatarData->avatar_id.notNull()))
|
||||
{
|
||||
setWebURL(pAvatarData->profile_url);
|
||||
}
|
||||
@@ -1424,14 +1381,13 @@ LLPanelAvatar::LLPanelAvatar(
|
||||
mPanelNotes(NULL),
|
||||
mPanelFirstLife(NULL),
|
||||
mPanelWeb(NULL),
|
||||
mAvatarID( LLUUID::null ), // mAvatarID is set with 'setAvatar' or 'setAvatarID'
|
||||
mAvatarID(LLUUID::null), // mAvatarID is set with setAvatarID()
|
||||
mHaveProperties(FALSE),
|
||||
mHaveStatistics(FALSE),
|
||||
mHaveNotes(false),
|
||||
mLastNotes(),
|
||||
mAllowEdit(allow_edit)
|
||||
{
|
||||
|
||||
sAllPanels.push_back(this);
|
||||
|
||||
LLCallbackMap::map_t factory_map;
|
||||
@@ -1447,22 +1403,19 @@ LLPanelAvatar::LLPanelAvatar(
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar.xml", &factory_map);
|
||||
|
||||
selectTab(0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
BOOL LLPanelAvatar::postBuild(void)
|
||||
{
|
||||
mTab = getChild<LLTabContainer>("tab");
|
||||
childSetAction("Kick",onClickKick,this);
|
||||
childSetAction("Freeze",onClickFreeze, this);
|
||||
childSetAction("Unfreeze", onClickUnfreeze, this);
|
||||
childSetAction("csr_btn", onClickCSR, this);
|
||||
getChild<LLUICtrl>("Kick")->setCommitCallback(boost::bind(LLAvatarActions::kick, boost::bind(&LLPanelAvatar::getAvatarID, this)));
|
||||
getChild<LLUICtrl>("Freeze")->setCommitCallback(boost::bind(LLAvatarActions::freeze, boost::bind(&LLPanelAvatar::getAvatarID, this)));
|
||||
getChild<LLUICtrl>("Unfreeze")->setCommitCallback(boost::bind(LLAvatarActions::unfreeze, boost::bind(&LLPanelAvatar::getAvatarID, this)));
|
||||
getChild<LLUICtrl>("csr_btn")->setCommitCallback(boost::bind(LLAvatarActions::csr, boost::bind(&LLPanelAvatar::getAvatarID, this)));
|
||||
childSetAction("OK", onClickOK, this);
|
||||
childSetAction("Cancel", onClickCancel, this);
|
||||
|
||||
childSetAction("copy_key",onClickGetKey,this);
|
||||
childSetCommitCallback("avatar_key",onCommitKey,this);
|
||||
|
||||
if(mTab && !sAllowFirstLife)
|
||||
{
|
||||
@@ -1502,38 +1455,6 @@ BOOL LLPanelAvatar::canClose()
|
||||
return !mPanelClassified || mPanelClassified->canClose();
|
||||
}
|
||||
|
||||
void LLPanelAvatar::setAvatar(LLViewerObject *avatarp)
|
||||
{
|
||||
// find the avatar and grab the name
|
||||
LLNameValue *firstname = avatarp->getNVPair("FirstName");
|
||||
LLNameValue *lastname = avatarp->getNVPair("LastName");
|
||||
|
||||
std::string name;
|
||||
if (firstname && lastname)
|
||||
{
|
||||
name.assign( firstname->getString() );
|
||||
name.append(" ");
|
||||
name.append( lastname->getString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
name.assign("");
|
||||
}
|
||||
|
||||
// If we have an avatar pointer, they must be online.
|
||||
setAvatarID(avatarp->getID(), name, ONLINE_STATUS_YES);
|
||||
}
|
||||
|
||||
void LLPanelAvatar::onCommitKey(LLUICtrl* ctrl, void* data)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) data;
|
||||
std::string keystring = self->getChild<LLLineEditor>("avater_key")->getText();
|
||||
LLUUID av_key = LLUUID::null;
|
||||
if(LLUUID::validate(keystring)) av_key = (LLUUID)keystring;
|
||||
|
||||
self->setAvatarID(av_key, LLStringUtil::null, ONLINE_STATUS_NO);
|
||||
}
|
||||
|
||||
void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
|
||||
{
|
||||
// Online status NO could be because they are hidden
|
||||
@@ -1554,6 +1475,7 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
|
||||
if (mAvatarID != gAgent.getID())
|
||||
{
|
||||
childSetVisible("Offer Teleport...",TRUE);
|
||||
childSetVisible("Find on Map", true);
|
||||
}
|
||||
|
||||
BOOL in_prelude = gAgent.inPrelude();
|
||||
@@ -1572,15 +1494,31 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
|
||||
childSetEnabled("Offer Teleport...", TRUE /*(online_status == ONLINE_STATUS_YES)*/);
|
||||
childSetToolTip("Offer Teleport...", getString("TeleportNormal"));
|
||||
}
|
||||
|
||||
// Note: we don't always know online status, so always allow gods to try to track
|
||||
childSetEnabled("Find on Map", gAgent.isGodlike() || is_agent_mappable(mAvatarID));
|
||||
if (!mIsFriend)
|
||||
{
|
||||
childSetToolTip("Find on Map", getString("ShowOnMapNonFriend"));
|
||||
}
|
||||
else if (ONLINE_STATUS_YES != online_status)
|
||||
{
|
||||
childSetToolTip("Find on Map", getString("ShowOnMapFriendOffline"));
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetToolTip("Find on Map", getString("ShowOnMapFriendOnline"));
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelAvatar::onAvatarNameResponse(const LLUUID& agent_id, const LLAvatarName& av_name){
|
||||
LLLineEditor* dnname_edit = getChild<LLLineEditor>("dnname");
|
||||
if(LLAvatarNameCache::useDisplayNames() && agent_id==mAvatarID) dnname_edit->setText(av_name.getCompleteName());
|
||||
void LLPanelAvatar::onAvatarNameResponse(const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
std::string name;
|
||||
LLAvatarNameCache::getPNSName(av_name, name);
|
||||
getChild<LLLineEditor>("dnname")->setText(name);
|
||||
}
|
||||
|
||||
void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name,
|
||||
EOnlineStatus online_status)
|
||||
void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id)
|
||||
{
|
||||
if (avatar_id.isNull()) return;
|
||||
|
||||
@@ -1598,13 +1536,12 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(mAvatarID, this);
|
||||
|
||||
// Determine if we have their calling card.
|
||||
mIsFriend = is_agent_friend(mAvatarID);
|
||||
mIsFriend = LLAvatarActions::isFriend(mAvatarID);
|
||||
|
||||
// setOnlineStatus uses mIsFriend
|
||||
setOnlineStatus(online_status);
|
||||
|
||||
setOnlineStatus(ONLINE_STATUS_NO);
|
||||
|
||||
BOOL own_avatar = (mAvatarID == gAgent.getID() );
|
||||
BOOL avatar_is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL;
|
||||
|
||||
for(std::list<LLPanelAvatarTab*>::iterator it=mAvatarPanelList.begin();it!=mAvatarPanelList.end();++it)
|
||||
{
|
||||
@@ -1617,41 +1554,10 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
// Teens don't have this.
|
||||
if (mPanelFirstLife) mPanelFirstLife->enableControls(own_avatar && mAllowEdit);
|
||||
|
||||
getChild<LLDropTarget>("drop_target_rect")->setEntityID(mAvatarID);
|
||||
if (LLDropTarget* drop_target = findChild<LLDropTarget>("drop_target_rect"))
|
||||
drop_target->setEntityID(mAvatarID);
|
||||
|
||||
LLNameEditor* name_edit = getChild<LLNameEditor>("name");
|
||||
if(name_edit)
|
||||
{
|
||||
if (name.empty())
|
||||
{
|
||||
name_edit->setNameID(avatar_id, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
name_edit->setText(name);
|
||||
}
|
||||
}
|
||||
|
||||
LLLineEditor* dnname_edit = getChild<LLLineEditor>("dnname");
|
||||
LLAvatarName av_name;
|
||||
if(dnname_edit){
|
||||
if(LLAvatarNameCache::useDisplayNames()){
|
||||
if(LLAvatarNameCache::get(avatar_id, &av_name)){
|
||||
dnname_edit->setText(av_name.getCompleteName());
|
||||
}
|
||||
else{
|
||||
dnname_edit->setText(name_edit->getText());
|
||||
LLAvatarNameCache::get(avatar_id, boost::bind(&LLPanelAvatar::onAvatarNameResponse, this, _1, _2));
|
||||
}
|
||||
childSetVisible("dnname",TRUE);
|
||||
childSetVisible("name",FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetVisible("dnname",FALSE);
|
||||
childSetVisible("name",TRUE);
|
||||
}
|
||||
}
|
||||
LLAvatarNameCache::get(avatar_id, boost::bind(&LLPanelAvatar::onAvatarNameResponse, this, _1, _2));
|
||||
|
||||
LLNameEditor* key_edit = getChild<LLNameEditor>("avatar_key");
|
||||
if(key_edit)
|
||||
@@ -1727,25 +1633,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
childSetVisible("Mute",TRUE);
|
||||
childSetEnabled("Mute",FALSE);
|
||||
|
||||
|
||||
childSetVisible("Find on Map",TRUE);
|
||||
// Note: we don't always know online status, so always allow gods to try to track
|
||||
BOOL enable_track = gAgent.isGodlike() || is_agent_mappable(mAvatarID);
|
||||
childSetEnabled("Find on Map",enable_track);
|
||||
if (!mIsFriend)
|
||||
{
|
||||
childSetToolTip("Find on Map", getString("ShowOnMapNonFriend"));
|
||||
}
|
||||
else if (ONLINE_STATUS_YES != online_status)
|
||||
{
|
||||
childSetToolTip("Find on Map", getString("ShowOnMapFriendOffline"));
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetToolTip("Find on Map", getString("ShowOnMapFriendOnline"));
|
||||
}
|
||||
childSetVisible("Add Friend...", true);
|
||||
childSetEnabled("Add Friend...", !avatar_is_friend);
|
||||
childSetEnabled("Add Friend...", !mIsFriend);
|
||||
childSetVisible("Pay...",TRUE);
|
||||
childSetEnabled("Pay...",FALSE);
|
||||
}
|
||||
@@ -1756,9 +1645,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
}
|
||||
}
|
||||
|
||||
BOOL is_god = FALSE;
|
||||
if (gAgent.isGodlike()) is_god = TRUE;
|
||||
|
||||
bool is_god = gAgent.isGodlike();
|
||||
childSetVisible("Kick", is_god);
|
||||
childSetEnabled("Kick", is_god);
|
||||
childSetVisible("Freeze", is_god);
|
||||
@@ -1832,36 +1719,6 @@ void LLPanelAvatar::resetGroupList()
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
//-----------------------------------------------------------------------------
|
||||
// onClickIM()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPanelAvatar::onClickIM(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
|
||||
std::string name;
|
||||
LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
|
||||
if (nameedit) name = nameedit->getText();
|
||||
gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID);
|
||||
}
|
||||
|
||||
void LLPanelAvatar::onClickGroupInvite(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
if (self->getAvatarID().notNull())
|
||||
{
|
||||
LLFloaterGroupPicker* widget;
|
||||
widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
|
||||
if (widget)
|
||||
{
|
||||
widget->center();
|
||||
widget->setPowersMask(GP_MEMBER_INVITE);
|
||||
widget->setSelectCallback(callback_invite_to_group, (void *)&(self->getAvatarID()));
|
||||
}
|
||||
}
|
||||
}
|
||||
//static
|
||||
void LLPanelAvatar::onClickGetKey(void *userdata)
|
||||
{
|
||||
@@ -1873,37 +1730,6 @@ void LLPanelAvatar::onClickGetKey(void *userdata)
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(agent_id.asString()));
|
||||
}
|
||||
|
||||
// static
|
||||
//-----------------------------------------------------------------------------
|
||||
// onClickTrack()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPanelAvatar::onClickTrack(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
|
||||
if( gFloaterWorldMap )
|
||||
{
|
||||
std::string name;
|
||||
LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
|
||||
if (nameedit) name = nameedit->getText();
|
||||
gFloaterWorldMap->trackAvatar(self->mAvatarID, name);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickAddFriend(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
LLNameEditor* name_edit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
|
||||
if (name_edit)
|
||||
{
|
||||
LLPanelFriends::requestFriendshipDialog(self->getAvatarID(),
|
||||
name_edit->getText());
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// onClickMute()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1912,43 +1738,18 @@ void LLPanelAvatar::onClickMute(void *userdata)
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
|
||||
LLUUID agent_id = self->getAvatarID();
|
||||
LLNameEditor* name_edit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
|
||||
|
||||
if (name_edit)
|
||||
|
||||
LLFloaterMute::showInstance();
|
||||
if (LLAvatarActions::isBlocked(agent_id))
|
||||
{
|
||||
std::string agent_name = name_edit->getText();
|
||||
LLFloaterMute::showInstance();
|
||||
|
||||
if (LLMuteList::getInstance()->isMuted(agent_id))
|
||||
{
|
||||
LLFloaterMute::getInstance()->selectMute(agent_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLMute mute(agent_id, agent_name, LLMute::AGENT);
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
}
|
||||
LLFloaterMute::getInstance()->selectMute(agent_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAvatarActions::toggleBlock(agent_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickOfferTeleport(void *userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
|
||||
handle_lure(self->mAvatarID);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickPay(void *userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
handle_pay_by_id(self->mAvatarID);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickOK(void *userdata)
|
||||
{
|
||||
@@ -2043,7 +1844,7 @@ void LLPanelAvatar::processProperties(void* data, EAvatarProcessorType type)
|
||||
if(type == APT_PROPERTIES)
|
||||
{
|
||||
const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( data );
|
||||
if (pAvatarData && (mAvatarID == pAvatarData->avatar_id) && (pAvatarData->avatar_id != LLUUID::null))
|
||||
if (pAvatarData && (mAvatarID == pAvatarData->avatar_id) && (pAvatarData->avatar_id.notNull()))
|
||||
{
|
||||
childSetEnabled("Instant Message...",TRUE);
|
||||
childSetEnabled("GroupInvite_Button",TRUE);
|
||||
@@ -2166,136 +1967,6 @@ void LLPanelAvatar::selectTabByName(std::string tab_name)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickKick(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
|
||||
S32 left, top;
|
||||
gFloaterView->getNewFloaterPosition(&left, &top);
|
||||
LLRect rect(left, top, left+400, top-300);
|
||||
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = self->mAvatarID;
|
||||
LLNotificationsUtil::add("KickUser", LLSD(), payload, finishKick);
|
||||
}
|
||||
|
||||
//static
|
||||
bool LLPanelAvatar::finishKick(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
msg->newMessageFast(_PREHASH_GodKickUser);
|
||||
msg->nextBlockFast(_PREHASH_UserInfo);
|
||||
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() );
|
||||
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_AgentID, avatar_id );
|
||||
msg->addU32("KickFlags", KICK_FLAGS_DEFAULT );
|
||||
msg->addStringFast(_PREHASH_Reason, response["message"].asString() );
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickFreeze(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = self->mAvatarID;
|
||||
LLNotificationsUtil::add("FreezeUser", LLSD(), payload, LLPanelAvatar::finishFreeze);
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLPanelAvatar::finishFreeze(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
msg->newMessageFast(_PREHASH_GodKickUser);
|
||||
msg->nextBlockFast(_PREHASH_UserInfo);
|
||||
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() );
|
||||
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_AgentID, avatar_id );
|
||||
msg->addU32("KickFlags", KICK_FLAGS_FREEZE );
|
||||
msg->addStringFast(_PREHASH_Reason, response["message"].asString() );
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickUnfreeze(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = self->mAvatarID;
|
||||
LLNotificationsUtil::add("UnFreezeUser", LLSD(), payload, LLPanelAvatar::finishUnfreeze);
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLPanelAvatar::finishUnfreeze(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
std::string text = response["message"].asString();
|
||||
if (option == 0)
|
||||
{
|
||||
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
msg->newMessageFast(_PREHASH_GodKickUser);
|
||||
msg->nextBlockFast(_PREHASH_UserInfo);
|
||||
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() );
|
||||
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_AgentID, avatar_id );
|
||||
msg->addU32("KickFlags", KICK_FLAGS_UNFREEZE );
|
||||
msg->addStringFast(_PREHASH_Reason, text );
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelAvatar::onClickCSR(void* userdata)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*)userdata;
|
||||
if (!self) return;
|
||||
|
||||
LLNameEditor* name_edit = self->getChild<LLNameEditor>("name");
|
||||
if (!name_edit) return;
|
||||
|
||||
std::string name = name_edit->getText();
|
||||
if (name.empty()) return;
|
||||
|
||||
std::string url = "http://csr.lindenlab.com/agent/";
|
||||
|
||||
// slow and stupid, but it's late
|
||||
S32 len = name.length();
|
||||
for (S32 i = 0; i < len; i++)
|
||||
{
|
||||
if (name[i] == ' ')
|
||||
{
|
||||
url += "%20";
|
||||
}
|
||||
else
|
||||
{
|
||||
url += name[i];
|
||||
}
|
||||
}
|
||||
|
||||
LLWeb::loadURL(url);
|
||||
}
|
||||
|
||||
|
||||
void* LLPanelAvatar::createPanelAvatarSecondLife(void* data)
|
||||
{
|
||||
LLPanelAvatar* self = (LLPanelAvatar*)data;
|
||||
|
||||
@@ -303,8 +303,7 @@ public:
|
||||
|
||||
// Fill in the avatar ID and handle some field fill-in, as well as
|
||||
// button enablement.
|
||||
// Pass one of the ONLINE_STATUS_foo constants above.
|
||||
void setAvatarID(const LLUUID &avatar_id, const std::string &name, EOnlineStatus online_status);
|
||||
void setAvatarID(const LLUUID &avatar_id);
|
||||
|
||||
void setOnlineStatus(EOnlineStatus online_status);
|
||||
|
||||
@@ -328,30 +327,14 @@ public:
|
||||
BOOL haveData() { return mHaveProperties && mHaveStatistics; }
|
||||
BOOL isEditable() const { return mAllowEdit; }
|
||||
|
||||
static void onClickTrack( void *userdata);
|
||||
static void onClickIM( void *userdata);
|
||||
static void onClickGroupInvite( void *userdata);
|
||||
static void onClickOfferTeleport( void *userdata);
|
||||
static void onClickPay( void *userdata);
|
||||
static void onClickGetKey(void *userdata);
|
||||
static void onClickAddFriend(void* userdata);
|
||||
static void onClickOK( void *userdata);
|
||||
static void onClickCancel( void *userdata);
|
||||
static void onClickKick( void *userdata);
|
||||
static void onClickFreeze( void *userdata);
|
||||
static void onClickUnfreeze(void *userdata);
|
||||
static void onClickCSR( void *userdata);
|
||||
static void onClickMute( void *userdata);
|
||||
static void onCommitKey(LLUICtrl* ctrl, void* data);
|
||||
|
||||
private:
|
||||
void enableOKIfReady();
|
||||
|
||||
static bool finishKick(const LLSD& notification, const LLSD& response);
|
||||
static bool finishFreeze(const LLSD& notification, const LLSD& response);
|
||||
static bool finishUnfreeze(const LLSD& notification, const LLSD& response);
|
||||
|
||||
static void showProfileCallback(S32 option, void *userdata);
|
||||
static void* createPanelAvatar(void* data);
|
||||
static void* createFloaterAvatarInfo(void* data);
|
||||
static void* createPanelAvatarSecondLife(void* data);
|
||||
@@ -393,8 +376,4 @@ private:
|
||||
static panel_list_t sAllPanels;
|
||||
};
|
||||
|
||||
// helper funcs
|
||||
void add_left_label(LLPanel *panel, const std::string& name, S32 y);
|
||||
|
||||
|
||||
#endif // LL_LLPANELAVATAR_H
|
||||
|
||||
@@ -46,20 +46,18 @@
|
||||
#include "message.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llclassifiedflags.h"
|
||||
#include "llclassifiedstatsresponder.h"
|
||||
#include "llcommandhandler.h" // for classified HTML detail page click tracking
|
||||
#include "llviewercontrol.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterclassified.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "llurldispatcher.h" // for classified HTML detail click teleports
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
@@ -894,7 +892,7 @@ void LLPanelClassified::onClickMap(void* data)
|
||||
void LLPanelClassified::onClickProfile(void* data)
|
||||
{
|
||||
LLPanelClassified* self = (LLPanelClassified*)data;
|
||||
LLFloaterAvatarInfo::showFromDirectory(self->mCreatorID);
|
||||
LLAvatarActions::showProfile(self->mCreatorID);
|
||||
self->sendClassifiedClickMessage("profile");
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ void LLPanelDirBrowser::showDetailPanel(S32 type, LLSD id)
|
||||
if (mFloaterDirectory && mFloaterDirectory->mPanelAvatarp)
|
||||
{
|
||||
mFloaterDirectory->mPanelAvatarp->setVisible(TRUE);
|
||||
mFloaterDirectory->mPanelAvatarp->setAvatarID(id.asUUID(), LLStringUtil::null, ONLINE_STATUS_NO);
|
||||
mFloaterDirectory->mPanelAvatarp->setAvatarID(id.asUUID());
|
||||
}
|
||||
break;
|
||||
case EVENT_CODE:
|
||||
|
||||
@@ -112,8 +112,6 @@ BOOL LLPanelDirClassified::postBuild()
|
||||
getChild<LLButton>("Browse")->setClickedCallback(boost::bind(&LLPanelDirBrowser::onClickSearchCore,this));
|
||||
setDefaultBtn( "Browse" );
|
||||
|
||||
getChild<LLButton>("Place an Ad...")->setClickedCallback(boost::bind(&LLPanelDirClassified::onClickCreateNewClassified,this));
|
||||
|
||||
getChild<LLButton>("Delete")->setClickedCallback(boost::bind(&LLPanelDirClassified::onClickDelete,this));
|
||||
childDisable("Delete");
|
||||
childHide("Delete");
|
||||
@@ -149,11 +147,6 @@ void LLPanelDirClassified::refresh()
|
||||
updateMaturityCheckbox();
|
||||
}
|
||||
|
||||
void LLPanelDirClassified::onClickCreateNewClassified()
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromObject(gAgent.getID(), "Classified");
|
||||
}
|
||||
|
||||
void LLPanelDirClassified::onClickDelete()
|
||||
{
|
||||
LLUUID classified_id;
|
||||
|
||||
@@ -65,9 +65,6 @@ protected:
|
||||
void onClickSearch();
|
||||
|
||||
void onKeystrokeNameClassified(LLLineEditor* line);
|
||||
|
||||
//
|
||||
void onClickCreateNewClassified();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
@@ -125,18 +125,14 @@ void LLPanelGroupTab::handleClickHelp()
|
||||
}
|
||||
}
|
||||
|
||||
LLPanelGroup::LLPanelGroup(const std::string& filename,
|
||||
const std::string& name,
|
||||
const LLUUID& group_id,
|
||||
const std::string& initial_tab_selected)
|
||||
: LLPanel(name, LLRect(), FALSE),
|
||||
LLPanelGroup::LLPanelGroup(const LLUUID& group_id)
|
||||
: LLPanel("PanelGroup", LLRect(), FALSE),
|
||||
LLGroupMgrObserver( group_id ),
|
||||
mCurrentTab( NULL ),
|
||||
mRequestedTab( NULL ),
|
||||
mTabContainer( NULL ),
|
||||
mIgnoreTransition( FALSE ),
|
||||
mForceClose( FALSE ),
|
||||
mInitialTab(initial_tab_selected),
|
||||
mAllowEdit( TRUE ),
|
||||
mShowingNotifyDialog( FALSE )
|
||||
{
|
||||
@@ -159,18 +155,14 @@ LLPanelGroup::LLPanelGroup(const std::string& filename,
|
||||
LLGroupMgr::getInstance()->addObserver(this);
|
||||
|
||||
// Pass on construction of this panel to the control factory.
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, filename, &getFactoryMap());
|
||||
mFilename = filename;
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group.xml", &getFactoryMap());
|
||||
}
|
||||
|
||||
LLPanelGroup::~LLPanelGroup()
|
||||
{
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
|
||||
int i;
|
||||
int tab_count = mTabContainer->getTabCount();
|
||||
|
||||
for (i = tab_count - 1; i >=0; --i)
|
||||
for (int i = mTabContainer->getTabCount() - 1; i >=0; --i)
|
||||
{
|
||||
LLPanelGroupTab* panelp =
|
||||
(LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
|
||||
@@ -181,10 +173,7 @@ LLPanelGroup::~LLPanelGroup()
|
||||
|
||||
void LLPanelGroup::updateTabVisibility()
|
||||
{
|
||||
S32 i;
|
||||
S32 tab_count = mTabContainer->getTabCount();
|
||||
|
||||
for (i = tab_count - 1; i >=0; --i)
|
||||
for (int i = mTabContainer->getTabCount() - 1; i >=0; --i)
|
||||
{
|
||||
LLPanelGroupTab* panelp =
|
||||
(LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
|
||||
@@ -211,38 +200,23 @@ BOOL LLPanelGroup::postBuild()
|
||||
|
||||
if (mTabContainer)
|
||||
{
|
||||
// Select the initial tab specified via constructor
|
||||
const BOOL recurse = TRUE;
|
||||
LLPanelGroupTab* tabp =
|
||||
getChild<LLPanelGroupTab>(mInitialTab, recurse);
|
||||
//our initial tab selection was invalid, just select the
|
||||
//first tab then or default to selecting the initial
|
||||
//selected tab specified in the layout file
|
||||
LLPanelGroupTab* tabp = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
|
||||
|
||||
//no tab was initially selected through constructor
|
||||
//or the XML, select the first tab
|
||||
if (!tabp)
|
||||
{
|
||||
//our initial tab selection was invalid, just select the
|
||||
//first tab then or default to selecting the initial
|
||||
//selected tab specified in the layout file
|
||||
mTabContainer->selectFirstTab();
|
||||
tabp = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
|
||||
|
||||
//no tab was initially selected through constructor
|
||||
//or the XML, select the first tab
|
||||
if (!tabp)
|
||||
{
|
||||
mTabContainer->selectFirstTab();
|
||||
tabp = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mTabContainer->selectTabPanel(tabp);
|
||||
}
|
||||
|
||||
mCurrentTab = tabp;
|
||||
|
||||
// Add click callbacks.
|
||||
S32 i;
|
||||
S32 tab_count = mTabContainer->getTabCount();
|
||||
|
||||
for (i = tab_count - 1; i >=0; --i)
|
||||
for (int i = mTabContainer->getTabCount() - 1; i >=0; --i)
|
||||
{
|
||||
LLPanel* tab_panel = mTabContainer->getPanelByIndex(i);
|
||||
LLPanelGroupTab* panelp =(LLPanelGroupTab*)tab_panel; // bit of a hack
|
||||
@@ -342,8 +316,6 @@ void LLPanelGroup::handleClickTab()
|
||||
|
||||
void LLPanelGroup::setGroupID(const LLUUID& group_id)
|
||||
{
|
||||
LLRect rect(getRect());
|
||||
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
mID = group_id;
|
||||
LLGroupMgr::getInstance()->addObserver(this);
|
||||
@@ -355,7 +327,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
|
||||
// For now, rebuild panel
|
||||
//delete children and rebuild panel
|
||||
deleteAllChildren();
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, mFilename, &getFactoryMap());
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group.xml", &getFactoryMap());
|
||||
}
|
||||
|
||||
void LLPanelGroup::selectTab(std::string tab_name)
|
||||
|
||||
@@ -58,10 +58,7 @@ class LLPanelGroup : public LLPanel,
|
||||
public LLPanelGroupTabObserver
|
||||
{
|
||||
public:
|
||||
LLPanelGroup(const std::string& filename,
|
||||
const std::string& name,
|
||||
const LLUUID& group_id,
|
||||
const std::string& initial_tab_selected = std::string());
|
||||
LLPanelGroup(const LLUUID& group_id);
|
||||
virtual ~LLPanelGroup();
|
||||
|
||||
virtual BOOL postBuild();
|
||||
@@ -119,9 +116,6 @@ protected:
|
||||
|
||||
BOOL mForceClose;
|
||||
|
||||
std::string mInitialTab;
|
||||
std::string mFilename;
|
||||
|
||||
std::string mDefaultNeedsApplyMesg;
|
||||
std::string mWantApplyMesg;
|
||||
|
||||
|
||||
@@ -36,9 +36,10 @@
|
||||
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "roles_constants.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
|
||||
// UI elements
|
||||
#include "llbutton.h"
|
||||
@@ -133,13 +134,13 @@ BOOL LLPanelGroupGeneral::postBuild()
|
||||
mBtnJoinGroup = getChild<LLButton>("join_button", recurse);
|
||||
if ( mBtnJoinGroup )
|
||||
{
|
||||
mBtnJoinGroup->setClickedCallback(boost::bind(&LLPanelGroupGeneral::onClickJoin, this));
|
||||
mBtnJoinGroup->setClickedCallback(boost::bind(LLGroupActions::join, mGroupID));
|
||||
}
|
||||
|
||||
mBtnInfo = getChild<LLButton>("info_button", recurse);
|
||||
if ( mBtnInfo )
|
||||
{
|
||||
mBtnInfo->setClickedCallback(boost::bind(&LLPanelGroupGeneral::onClickInfo, this));
|
||||
mBtnInfo->setClickedCallback(boost::bind(LLGroupActions::show, mGroupID));
|
||||
}
|
||||
|
||||
LLTextBox* founder = getChild<LLTextBox>("founder_name");
|
||||
@@ -154,7 +155,7 @@ BOOL LLPanelGroupGeneral::postBuild()
|
||||
mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
|
||||
if (mListVisibleMembers)
|
||||
{
|
||||
mListVisibleMembers->setDoubleClickCallback(boost::bind(&LLPanelGroupGeneral::openProfile,this));
|
||||
mListVisibleMembers->setDoubleClickCallback(boost::bind(LLAvatarActions::showProfile, boost::bind(&LLScrollListCtrl::getCurrentID, mListVisibleMembers)));
|
||||
}
|
||||
|
||||
// Options
|
||||
@@ -322,83 +323,6 @@ void LLPanelGroupGeneral::onCommitTitle()
|
||||
mComboActiveTitle->resetDirty();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupGeneral::onClickInfo(void *userdata)
|
||||
{
|
||||
LLPanelGroupGeneral *self = (LLPanelGroupGeneral *)userdata;
|
||||
|
||||
if ( !self ) return;
|
||||
|
||||
lldebugs << "open group info: " << self->mGroupID << llendl;
|
||||
|
||||
LLFloaterGroupInfo::showFromUUID(self->mGroupID);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupGeneral::onClickJoin(void *userdata)
|
||||
{
|
||||
LLPanelGroupGeneral *self = (LLPanelGroupGeneral *)userdata;
|
||||
|
||||
if ( !self ) return;
|
||||
|
||||
lldebugs << "joining group: " << self->mGroupID << llendl;
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(self->mGroupID);
|
||||
|
||||
if (gdatap)
|
||||
{
|
||||
S32 cost = gdatap->mMembershipFee;
|
||||
LLSD args;
|
||||
args["COST"] = llformat("%d", cost);
|
||||
LLSD payload;
|
||||
payload["group_id"] = self->mGroupID;
|
||||
|
||||
if (can_afford_transaction(cost))
|
||||
{
|
||||
LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, LLPanelGroupGeneral::joinDlgCB);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("JoinGroupCannotAfford", args, payload);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "LLGroupMgr::getInstance()->getGroupData(" << self->mGroupID
|
||||
<< ") was NULL" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLPanelGroupGeneral::joinDlgCB(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
if (option == 1)
|
||||
{
|
||||
// user clicked cancel
|
||||
return false;
|
||||
}
|
||||
|
||||
LLGroupMgr::getInstance()->sendGroupMemberJoin(notification["payload"]["group_id"].asUUID());
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupGeneral::openProfile(void* data)
|
||||
{
|
||||
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
|
||||
|
||||
if (self && self->mListVisibleMembers)
|
||||
{
|
||||
LLScrollListItem* selected = self->mListVisibleMembers->getFirstSelected();
|
||||
if (selected)
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory( selected->getUUID() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LLPanelGroupGeneral::needsApply(std::string& mesg)
|
||||
{
|
||||
updateChanged();
|
||||
|
||||
@@ -75,14 +75,9 @@ private:
|
||||
void onCommitUserOnly();
|
||||
void onCommitTitle();
|
||||
void onCommitEnrollment();
|
||||
static void onClickJoin(void* userdata);
|
||||
static void onClickInfo(void* userdata);
|
||||
static void onReceiveNotices(LLUICtrl* ctrl, void* data);
|
||||
static void openProfile(void* data);
|
||||
void addMember(LLGroupMemberData* member);
|
||||
|
||||
static bool joinDlgCB(const LLSD& notification, const LLSD& response);
|
||||
|
||||
void updateMembers();
|
||||
void updateChanged();
|
||||
bool confirmMatureApply(const LLSD& notification, const LLSD& response);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "llbutton.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llgroupmgr.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
@@ -49,8 +50,6 @@
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
class LLPanelGroupInvite::impl : public boost::signals2::trackable
|
||||
{
|
||||
public:
|
||||
@@ -183,7 +182,7 @@ void LLPanelGroupInvite::impl::submitInvitations()
|
||||
iter != items.end(); ++iter)
|
||||
{
|
||||
LLScrollListItem* item = *iter;
|
||||
if(gdatap->mMembers.find(item->getUUID()) != gdatap->mMembers.end())
|
||||
if(LLGroupActions::isAvatarMemberOfGroup(mGroupID, item->getUUID()))
|
||||
{
|
||||
already_in_group = true;
|
||||
continue;
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
#include "llcheckboxctrl.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llbutton.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloatergroupinvite.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "lllineeditor.h"
|
||||
@@ -1202,8 +1202,7 @@ void LLPanelGroupMembersSubTab::handleMemberDoubleClick()
|
||||
LLScrollListItem* selected = mMembersList->getFirstSelected();
|
||||
if (selected)
|
||||
{
|
||||
LLUUID member_id = selected->getUUID();
|
||||
LLFloaterAvatarInfo::showFromDirectory( member_id );
|
||||
LLAvatarActions::showProfile(selected->getUUID());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,16 +36,14 @@
|
||||
|
||||
#include "llpanelpermissions.h"
|
||||
|
||||
#include "lluuid.h"
|
||||
#include "llpermissions.h"
|
||||
#include "llcategory.h"
|
||||
#include "llclickaction.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llstring.h"
|
||||
#include "lltrans.h"
|
||||
#include "llwindow.h"
|
||||
|
||||
#include "llviewerwindow.h"
|
||||
#include "llwindow.h"
|
||||
#include "llresmgr.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llbutton.h"
|
||||
@@ -53,20 +51,16 @@
|
||||
#include "llviewerobject.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llagent.h"
|
||||
#include "llstatusbar.h" // for getBalance()
|
||||
#include "llavataractions.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "lldbstrings.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llnamebox.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "roles_constants.h"
|
||||
#include "lltrans.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
|
||||
#include "lfsimfeaturehandler.h"
|
||||
@@ -155,7 +149,8 @@ BOOL LLPanelPermissions::postBuild()
|
||||
childSetCommitCallback("clickaction",LLPanelPermissions::onCommitClickAction,this);
|
||||
childSetCommitCallback("search_check",LLPanelPermissions::onCommitIncludeInSearch,this);
|
||||
|
||||
mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
|
||||
mLabelGroupName = new LLNameBox("Group Name", getChild<LLTextBox>("Group Name Proxy")->getRect());
|
||||
addChild(mLabelGroupName);
|
||||
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
LFSimFeatureHandler::instance().setSupportsExportCallback(boost::bind(&LLPanelPermissions::refresh, this));
|
||||
@@ -267,7 +262,7 @@ void LLPanelPermissions::disableAll()
|
||||
combo_click_action->clear();
|
||||
}
|
||||
getChildView("B:")->setVisible( FALSE);
|
||||
getChildView("O:")->setVisible( FALSE);
|
||||
//getChildView("O:")->setVisible( FALSE);
|
||||
getChildView("G:")->setVisible( FALSE);
|
||||
getChildView("E:")->setVisible( FALSE);
|
||||
getChildView("N:")->setVisible( FALSE);
|
||||
@@ -672,8 +667,8 @@ void LLPanelPermissions::refresh()
|
||||
perm_string = mask_to_string(owner_mask_on);
|
||||
if (!supports_export && owner_mask_on & PERM_EXPORT) // Hide Export when not available
|
||||
perm_string.erase(perm_string.find_last_of("E"));
|
||||
getChild<LLUICtrl>("O:")->setValue("O: " + perm_string);
|
||||
getChildView("O:")->setVisible( TRUE);
|
||||
//getChild<LLUICtrl>("O:")->setValue("O: " + perm_string);
|
||||
//getChildView("O:")->setVisible( TRUE);
|
||||
|
||||
getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(group_mask_on));
|
||||
getChildView("G:")->setVisible( TRUE);
|
||||
@@ -701,7 +696,7 @@ void LLPanelPermissions::refresh()
|
||||
{
|
||||
childSetVisible("perm_modify", true);
|
||||
getChildView("B:")->setVisible( FALSE);
|
||||
getChildView("O:")->setVisible( FALSE);
|
||||
//getChildView("O:")->setVisible( FALSE);
|
||||
getChildView("G:")->setVisible( FALSE);
|
||||
getChildView("E:")->setVisible( FALSE);
|
||||
getChildView("N:")->setVisible( FALSE);
|
||||
@@ -1007,7 +1002,7 @@ void LLPanelPermissions::onClickCreator(void *data)
|
||||
{
|
||||
LLPanelPermissions *self = (LLPanelPermissions *)data;
|
||||
|
||||
LLFloaterAvatarInfo::showFromObject(self->mCreatorID);
|
||||
LLAvatarActions::showProfile(self->mCreatorID);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1019,25 +1014,24 @@ void LLPanelPermissions::onClickOwner(void *data)
|
||||
{
|
||||
LLUUID group_id;
|
||||
LLSelectMgr::getInstance()->selectGetGroup(group_id);
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
LLGroupActions::show(group_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromObject(self->mOwnerID);
|
||||
LLAvatarActions::showProfile(self->mOwnerID);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// LLFloaterAvatarInfo::showFromObject(self->mOwnerID);
|
||||
// LLAvatarActions::showProfile(self->mOwnerID);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelPermissions::onClickLastOwner(void *data)
|
||||
{
|
||||
LLPanelPermissions *self = (LLPanelPermissions *)data;
|
||||
if(self->mLastOwnerID.notNull())
|
||||
LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID);
|
||||
LLAvatarActions::showProfile(self->mLastOwnerID);
|
||||
}
|
||||
|
||||
void LLPanelPermissions::onClickGroup(void* data)
|
||||
@@ -1071,7 +1065,7 @@ void LLPanelPermissions::onClickOpenGroup(void* data)
|
||||
LLUUID group_id;
|
||||
LLSelectMgr::getInstance()->selectGetGroup(group_id);
|
||||
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
LLGroupActions::show(group_id);
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
@@ -29,9 +29,13 @@
|
||||
|
||||
#ifdef AI_UNUSED
|
||||
#include "llagent.h"
|
||||
#endif // AI_UNUSED
|
||||
#include "llavataractions.h"
|
||||
#ifdef AI_UNUSED
|
||||
#include "llfloaterreg.h"
|
||||
#endif // AI_UNUSED
|
||||
#include "llcommandhandler.h"
|
||||
#ifdef AI_UNUSED
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanelpicks.h"
|
||||
#include "lltabcontainer.h"
|
||||
@@ -75,12 +79,13 @@ public:
|
||||
}
|
||||
};
|
||||
LLProfileHandler gProfileHandler;
|
||||
#endif // AI_UNUSED
|
||||
|
||||
class LLAgentHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// requires trusted browser to trigger
|
||||
LLAgentHandler() : LLCommandHandler("agent", UNTRUSTED_THROTTLE) { }
|
||||
LLAgentHandler() : LLCommandHandler("agent", true/*UNTRUSTED_THROTTLE*/) { }
|
||||
|
||||
bool handle(const LLSD& params, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
@@ -99,11 +104,13 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Singu TODO
|
||||
if (verb == "inspect")
|
||||
{
|
||||
LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", avatar_id));
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
if (verb == "im")
|
||||
{
|
||||
@@ -113,11 +120,13 @@ public:
|
||||
|
||||
if (verb == "pay")
|
||||
{
|
||||
/*
|
||||
if (!LLUI::sSettingGroups["config"]->getBOOL("EnableAvatarPay"))
|
||||
{
|
||||
LLNotificationsUtil::add("NoAvatarPay", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
LLAvatarActions::pay(avatar_id);
|
||||
return true;
|
||||
@@ -159,6 +168,7 @@ public:
|
||||
LLAgentHandler gAgentHandler;
|
||||
|
||||
|
||||
#ifdef AI_UNUSED
|
||||
//-- LLPanelProfile::ChildStack begins ----------------------------------------
|
||||
LLPanelProfile::ChildStack::ChildStack()
|
||||
: mParent(NULL)
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "llagent.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewerassettype.h"
|
||||
|
||||
@@ -550,7 +551,7 @@ void LLPreview::handleReshape(const LLRect& new_rect, bool by_user)
|
||||
// LLMultiPreview
|
||||
//
|
||||
|
||||
LLMultiPreview::LLMultiPreview(const LLRect& rect) : LLMultiFloater(std::string("Preview"), rect)
|
||||
LLMultiPreview::LLMultiPreview(const LLRect& rect) : LLMultiFloater(LLTrans::getString("MultiPreviewTitle"), rect)
|
||||
{
|
||||
setCanResize(TRUE);
|
||||
}
|
||||
@@ -558,7 +559,7 @@ LLMultiPreview::LLMultiPreview(const LLRect& rect) : LLMultiFloater(std::string(
|
||||
void LLMultiPreview::open() /*Flawfinder: ignore*/
|
||||
{
|
||||
LLMultiFloater::open(); /*Flawfinder: ignore*/
|
||||
LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel();
|
||||
LLPreview* frontmost_preview = dynamic_cast<LLPreview*>(mTabContainer->getCurrentPanel());
|
||||
if (frontmost_preview && frontmost_preview->getAssetStatus() == LLPreview::PREVIEW_ASSET_UNLOADED)
|
||||
{
|
||||
frontmost_preview->loadAsset();
|
||||
@@ -571,7 +572,7 @@ void LLMultiPreview::handleReshape(const LLRect& new_rect, bool by_user)
|
||||
{
|
||||
if(new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight())
|
||||
{
|
||||
LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel();
|
||||
LLPreview* frontmost_preview = dynamic_cast<LLPreview*>(mTabContainer->getCurrentPanel());
|
||||
if (frontmost_preview) frontmost_preview->userResized();
|
||||
}
|
||||
LLFloater::handleReshape(new_rect, by_user);
|
||||
@@ -580,7 +581,7 @@ void LLMultiPreview::handleReshape(const LLRect& new_rect, bool by_user)
|
||||
|
||||
void LLMultiPreview::tabOpen(LLFloater* opened_floater)
|
||||
{
|
||||
LLPreview* opened_preview = (LLPreview*)opened_floater;
|
||||
LLPreview* opened_preview = dynamic_cast<LLPreview*>(opened_floater);
|
||||
if (opened_preview && opened_preview->getAssetStatus() == LLPreview::PREVIEW_ASSET_UNLOADED)
|
||||
{
|
||||
opened_preview->loadAsset();
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "llpreviewtexture.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcombobox.h"
|
||||
#include "statemachine/aifilepicker.h"
|
||||
@@ -47,12 +48,10 @@
|
||||
#include "lltrans.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltextureview.h"
|
||||
#include "llui.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
|
||||
const S32 PREVIEW_TEXTURE_MIN_WIDTH = 300;
|
||||
const S32 PREVIEW_TEXTURE_MIN_HEIGHT = 120;
|
||||
@@ -672,8 +671,7 @@ bool LLPreviewTexture::setAspectRatio(const F32 width, const F32 height)
|
||||
void LLPreviewTexture::onClickProfile(void* userdata)
|
||||
{
|
||||
LLPreviewTexture* self = (LLPreviewTexture*) userdata;
|
||||
LLUUID key = self->mCreatorKey;
|
||||
if (!key.isNull()) LLFloaterAvatarInfo::showFromDirectory(key);
|
||||
LLAvatarActions::showProfile(self->mCreatorKey);
|
||||
}
|
||||
|
||||
void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata)
|
||||
|
||||
@@ -608,11 +608,13 @@ void LLViewerInventoryCategory::removeFromServer( void )
|
||||
llinfos << "Removing inventory category " << mUUID << " from server."
|
||||
<< llendl;
|
||||
// communicate that change with the server.
|
||||
#ifndef DELETE_SYSTEM_FOLDERS
|
||||
if(LLFolderType::lookupIsProtectedType(mPreferredType))
|
||||
{
|
||||
LLNotificationsUtil::add("CannotRemoveProtectedCategories");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
LLInventoryModel::LLCategoryUpdate up(mParentUUID, -1);
|
||||
gInventory.accountForUpdate(up);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "lldiriterator.h"
|
||||
#include "llevent.h" // LLSimpleListener
|
||||
#include "llhoverview.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "llmimetypes.h"
|
||||
#include "llnotifications.h"
|
||||
@@ -57,7 +58,7 @@
|
||||
#include "llweb.h"
|
||||
#include "llwebprofile.h"
|
||||
|
||||
#include "llfloateravatarinfo.h" // for getProfileURL() function
|
||||
std::string getProfileURL(const std::string& agent_name);
|
||||
//#include "viewerversion.h"
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,6 @@ BOOL enable_deselect(void*);
|
||||
BOOL enable_undo(void*);
|
||||
BOOL enable_redo(void*);
|
||||
|
||||
// returns TRUE if we have a friend relationship with agent_id
|
||||
BOOL is_agent_friend(const LLUUID& agent_id);
|
||||
BOOL is_agent_mappable(const LLUUID& agent_id);
|
||||
|
||||
void menu_toggle_control( void* user_data );
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include "llfloaterbuycurrency.h"
|
||||
#include "llfloaterbuyland.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloaterimagepreview.h"
|
||||
#include "llfloaterland.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
@@ -69,6 +68,7 @@
|
||||
#include "llfloaterpostcard.h"
|
||||
#include "llfloaterpreference.h"
|
||||
#include "llfloaterteleporthistory.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llhudeffecttrail.h"
|
||||
#include "llhudmanager.h"
|
||||
#include "llimpanel.h"
|
||||
@@ -639,7 +639,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
|
||||
|
||||
if (option == 2 && !group_id.isNull())
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
LLGroupActions::show(group_id);
|
||||
LLSD args;
|
||||
args["MESSAGE"] = message;
|
||||
LLNotificationsUtil::add("JoinGroup", args, notification["payload"]);
|
||||
@@ -1780,7 +1780,7 @@ bool group_vote_callback(const LLSD& notification, const LLSD& response)
|
||||
case 0:
|
||||
// Vote Now
|
||||
// Open up the voting tab
|
||||
LLFloaterGroupInfo::showFromUUID(group_id, "voting_tab");
|
||||
LLGroupActions::showTab(group_id, "voting_tab");
|
||||
break;
|
||||
default:
|
||||
// Vote Later or
|
||||
@@ -2533,7 +2533,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
// Also send down the old path for now.
|
||||
if (IM_GROUP_NOTICE_REQUESTED == dialog)
|
||||
{
|
||||
LLFloaterGroupInfo::showNotice(subj,mes,group_id,has_inventory,item_name,info);
|
||||
LLGroupActions::showNotice(subj,mes,group_id,has_inventory,item_name,info);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2680,9 +2680,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
case IM_INVENTORY_ACCEPTED:
|
||||
{
|
||||
// args["NAME"] = name;
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
|
||||
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
// Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
|
||||
bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
|
||||
(!LLFloaterAvatarInfo::getInstance(from_id));
|
||||
(!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id));
|
||||
args["NAME"] = (!fRlvFilterName) ? name : RlvStrings::getAnonym(name);
|
||||
// [/RLVa:KB]
|
||||
LLNotificationsUtil::add("InventoryAccepted", args);
|
||||
@@ -2691,9 +2692,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
case IM_INVENTORY_DECLINED:
|
||||
{
|
||||
// args["NAME"] = name;
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
|
||||
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
// Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
|
||||
bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
|
||||
(!LLFloaterAvatarInfo::getInstance(from_id));
|
||||
(!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id));
|
||||
args["NAME"] = (!fRlvFilterName) ? name : RlvStrings::getAnonym(name);
|
||||
// [/RLVa:KB]
|
||||
LLNotificationsUtil::add("InventoryDeclined", args);
|
||||
|
||||
@@ -1238,7 +1238,7 @@ void LLWorldMapView::drawAgents()
|
||||
// Show Individual agents (or little stacks where real agents are)
|
||||
|
||||
// Here's how we'd choose the color if info.mID were available but it's not being sent:
|
||||
// LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? friend_color : avatar_color;
|
||||
// LLColor4 color = (agent_count == 1 && LLAvatarActions::isFriend(info.mID)) ? friend_color : avatar_color;
|
||||
// Reduce the stack size as you zoom out - always display at lease one agent where there is one or more
|
||||
S32 agent_count = (S32)(((it->getCount()-1) * agents_scale + (it->getCount()-1) * 0.1f)+.1f) + 1;
|
||||
drawImageStack(it->getGlobalPosition(), sAvatarSmallImage, agent_count, 3.f, avatar_color);
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
/**
|
||||
* @file randgauss.h
|
||||
* @brief randgauss class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
const F32 table[][2] = {
|
||||
{.00f, .5f},
|
||||
{.01f, .504f},
|
||||
{.02f, .508f},
|
||||
{.03f, .512f},
|
||||
{.06f, .5239f},
|
||||
{.08f, .5319f},
|
||||
{.11f, .5438f},
|
||||
{.13f, .5517f},
|
||||
{.16f, .5636f},
|
||||
{.18f, .5714f},
|
||||
{.21f, .5832f},
|
||||
{.23f, .5910f},
|
||||
{.26f, .6026f},
|
||||
{.28f, .6103f},
|
||||
{.31f, .6217f},
|
||||
{.34f, .6331f},
|
||||
{.36f, .6406f},
|
||||
{.39f, .6517f},
|
||||
{.42f, .6628f},
|
||||
{.44f, .6700f},
|
||||
{.47f, .6808f},
|
||||
{.50f, .6915f},
|
||||
{.53f, .7019f},
|
||||
{.56f, .7123f},
|
||||
{.59f, .7224f},
|
||||
{.62f, .7324f},
|
||||
{.65f, .7422f},
|
||||
{.68f, .7517f},
|
||||
{.71f, .7611f},
|
||||
{.74f, .7703f},
|
||||
{.78f, .7823f},
|
||||
{.81f, .7910f},
|
||||
{.85f, .8023f},
|
||||
{.88f, .8106f},
|
||||
{.92f, .8212f},
|
||||
{.96f, .8315f},
|
||||
{1.0f, .8413f},
|
||||
{1.04f, .8508f},
|
||||
{1.09f, .8621f},
|
||||
{1.13f, .8708f},
|
||||
{1.18f, .8810f},
|
||||
{1.23f, .8907f},
|
||||
{1.29f, .9015f},
|
||||
{1.35f, .9115f},
|
||||
{1.41f, .9207f},
|
||||
{1.48f, .9306f},
|
||||
{1.56f, .9406f},
|
||||
{1.65f, .9505f},
|
||||
{1.76f, .9608f},
|
||||
{1.89f, .9706f},
|
||||
{2.06f, .9803f},
|
||||
{2.33f, .9901f},
|
||||
{99.0f, 1.0f}};
|
||||
|
||||
inline F32 randGauss(F32 mean, F32 stdev)
|
||||
{
|
||||
S32 i = 0;
|
||||
F32 u = rand() / (F32) RAND_MAX;
|
||||
F32 n;
|
||||
|
||||
if (u >= 0.5)
|
||||
{
|
||||
while (u > table[i][1])
|
||||
i++;
|
||||
|
||||
n = table[i-1][0];
|
||||
|
||||
} else {
|
||||
u = 1 - u;
|
||||
while (u > table[i][1])
|
||||
i++;
|
||||
n = 1 - table[i-1][0];
|
||||
}
|
||||
//printf("u: %f, n: %f, i: %d\n", u, n, i); //debug
|
||||
|
||||
return (mean + stdev * n);
|
||||
}
|
||||
|
||||
@@ -151,6 +151,8 @@ enum ERlvBehaviour {
|
||||
RLV_BHVR_SENDIMTO, // "sendimto"
|
||||
RLV_BHVR_RECVIM, // "recvim"
|
||||
RLV_BHVR_RECVIMFROM, // "recvimfrom"
|
||||
RLV_BHVR_STARTIM, // "startim"
|
||||
RLV_BHVR_STARTIMTO, // "startimto"
|
||||
RLV_BHVR_PERMISSIVE, // "permissive"
|
||||
RLV_BHVR_NOTIFY, // "notify"
|
||||
RLV_BHVR_SHOWINV, // "showinv"
|
||||
|
||||
@@ -495,10 +495,6 @@ bool RlvExtGetSet::findDebugSetting(std::string& strSetting, S16& flags)
|
||||
{
|
||||
LLStringUtil::toLower(strSetting); // Convenience for non-RLV calls
|
||||
|
||||
// HACK-RLVa: bad code but it's just a temporary measure to provide a smooth changeover from the old to the new rebranded settings
|
||||
if ( (strSetting.length() >= 14) && (0 == strSetting.find("restrainedlife")) )
|
||||
strSetting = "restrainedlove" + strSetting.substr(14);
|
||||
|
||||
std::string strTemp;
|
||||
for (std::map<std::string, S16>::const_iterator itSetting = m_DbgAllowed.begin(); itSetting != m_DbgAllowed.end(); ++itSetting)
|
||||
{
|
||||
|
||||
@@ -58,6 +58,7 @@ bool rlvGetShowException(ERlvBehaviour eBhvr)
|
||||
case RLV_BHVR_RECVEMOTE:
|
||||
case RLV_BHVR_SENDIM:
|
||||
case RLV_BHVR_RECVIM:
|
||||
case RLV_BHVR_STARTIM:
|
||||
case RLV_BHVR_TPLURE:
|
||||
case RLV_BHVR_ACCEPTTP:
|
||||
return true;
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
#include "llagent.h"
|
||||
#include "llappearancemgr.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llhudtext.h"
|
||||
#include "llstartup.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
@@ -195,7 +195,7 @@ void RlvHandler::removeCommandHandler(RlvCommandHandler* pCmdHandler)
|
||||
m_CommandHandlers.remove(pCmdHandler);
|
||||
}
|
||||
|
||||
// Checked: 2009-10-26 (RLVa-1.1.0a) | Modified: RLVa-1.1.0a
|
||||
// Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0a
|
||||
void RlvHandler::clearCommandHandlers()
|
||||
{
|
||||
std::list<RlvCommandHandler*>::const_iterator itHandler = m_CommandHandlers.begin();
|
||||
@@ -730,7 +730,6 @@ size_t utf8str_strlen(const std::string& utf8)
|
||||
return length;
|
||||
}
|
||||
|
||||
// TODO-RLV: works, but more testing won't hurt
|
||||
std::string utf8str_chtruncate(const std::string& utf8, size_t length)
|
||||
{
|
||||
if (0 == length)
|
||||
@@ -1113,7 +1112,7 @@ void RlvHandler::clearState()
|
||||
#define VERIFY_OPTION(x) { if (!(x)) { eRet = RLV_RET_FAILED_OPTION; break; } }
|
||||
#define VERIFY_OPTION_REF(x) { if (!(x)) { eRet = RLV_RET_FAILED_OPTION; break; } fRefCount = true; }
|
||||
|
||||
// Checked: 2010-03-03 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a
|
||||
// Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||
ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
{
|
||||
// NOTE: - at this point the command has already been:
|
||||
@@ -1154,8 +1153,8 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
VERIFY_OPTION_REF(strOption.empty());
|
||||
}
|
||||
break;
|
||||
case RLV_BHVR_ADDOUTFIT: // @addoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c
|
||||
case RLV_BHVR_REMOUTFIT: // @remoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c
|
||||
case RLV_BHVR_ADDOUTFIT: // @addoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
|
||||
case RLV_BHVR_REMOUTFIT: // @remoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
|
||||
{
|
||||
// If there's an option it should specify a wearable type name (reference count on no option *and* a valid option)
|
||||
RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption());
|
||||
@@ -1244,7 +1243,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
VERIFY_OPTION_REF(strOption.empty());
|
||||
}
|
||||
break;
|
||||
case RLV_BHVR_NOTIFY: // @notify:<params>=add|rem - Checked: 2010-03-03 (RLVa-1.1.3a) | Modified: RLVa-1.2.0a
|
||||
case RLV_BHVR_NOTIFY: // @notify:<params>=add|rem - Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||
{
|
||||
// There should be an option that we can successfully parse (if there's an empty option the command is invalid)
|
||||
S32 nChannel; std::string strFilter;
|
||||
@@ -1277,10 +1276,10 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
case RLV_BHVR_SHOWLOC: // @showloc=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_SHOWNAMES: // @shownames=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_EMOTE: // @emote=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_SENDCHAT: // @sendchat=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_CHATWHISPER: // @chatwhisper=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_CHATNORMAL: // @chatnormal=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_CHATSHOUT: // @chatshout=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_SENDCHAT: // @sendchat=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_CHATWHISPER: // @chatwhisper=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_CHATNORMAL: // @chatnormal=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_CHATSHOUT: // @chatshout=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_PERMISSIVE: // @permissive=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_SHOWINV: // @showinv=n|y - Checked: 2010-03-01 (RLVa-1.2.0a)
|
||||
case RLV_BHVR_SHOWMINIMAP: // @showminimap=n|y - Checked: 2010-02-28 (RLVa-1.2.0a)
|
||||
@@ -1291,12 +1290,12 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
case RLV_BHVR_STANDTP: // @standtp=n|y - Checked: 2010-08-29 (RLVa-1.2.1c)
|
||||
case RLV_BHVR_TPLM: // @tplm=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_TPLOC: // @tploc=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_VIEWNOTE: // @viewnote=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_VIEWSCRIPT: // @viewscript=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_VIEWTEXTURE: // @viewtexture=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_VIEWNOTE: // @viewnote=n|y - Checked: 2010-03-27 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_VIEWSCRIPT: // @viewscript=n|y - Checked: 2010-03-27 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_VIEWTEXTURE: // @viewtexture=n|y - Checked: 2010-03-27 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_ACCEPTPERMISSION: // @acceptpermission=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
|
||||
case RLV_BHVR_ALLOWIDLE: // @allowidle=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_ALLOWIDLE: // @allowidle=n|y - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.1.0h
|
||||
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
|
||||
case RLV_BHVR_REZ: // @rez=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_FARTOUCH: // @fartouch=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
@@ -1318,10 +1317,11 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
VERIFY_OPTION_REF(strOption.empty());
|
||||
break;
|
||||
// The following block is only valid if there's no option (= restriction) or if it specifies a valid UUID (= behaviour exception)
|
||||
case RLV_BHVR_RECVCHAT: // @recvchat[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_RECVEMOTE: // @recvemote[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_RECVCHAT: // @recvchat[:<uuid>]=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_RECVEMOTE: // @recvemote[:<uuid>]=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_SENDIM: // @sendim[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_RECVIM: // @recvim[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_STARTIM: // @startim[:<uuid>]=n|y - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
case RLV_BHVR_TPLURE: // @tplure[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_ACCEPTTP: // @accepttp[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
|
||||
case RLV_BHVR_TOUCHATTACH: // @touchattach[:<uuid>=n|y - Checked: 2010-01-01 (RLVa-1.1.0l) | Added: RLVa-1.1.0l
|
||||
@@ -1350,6 +1350,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
case RLV_BHVR_RECVEMOTEFROM: // @recvemotefrom:<uuid>=n|y - Checked: 2010-11-30 (RLVa-1.3.0c) | Added: RLVa-1.3.0c
|
||||
case RLV_BHVR_SENDIMTO: // @sendimto:<uuid>=n|y - Checked: 2010-11-30 (RLVa-1.3.0c) | Added: RLVa-1.3.0c
|
||||
case RLV_BHVR_RECVIMFROM: // @recvimfrom:<uuid>=n|y - Checked: 2010-11-30 (RLVa-1.3.0c) | Added: RLVa-1.3.0c
|
||||
case RLV_BHVR_STARTIMTO: // @startimto:<uuid>=n|y - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
case RLV_BHVR_EDITOBJ: // @editobj:<uuid>=n|y - Checked: 2010-11-29 (RLVa-1.3.0c) | Added: RLVa-1.3.0c
|
||||
case RLV_BHVR_TOUCHTHIS: // @touchthis:<uuid>=n|y - Checked: 2010-01-01 (RLVa-1.1.0l) | Added: RLVa-1.1.0l
|
||||
{
|
||||
@@ -1399,7 +1400,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
return eRet;
|
||||
}
|
||||
|
||||
// Checked: 2010-03-03 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a
|
||||
// Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||
ERlvCmdRet RlvHandler::onAddRemAttach(const RlvCommand& rlvCmd, bool& fRefCount)
|
||||
{
|
||||
RLV_ASSERT( (RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType()) );
|
||||
@@ -1434,7 +1435,7 @@ ERlvCmdRet RlvHandler::onAddRemAttach(const RlvCommand& rlvCmd, bool& fRefCount)
|
||||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
// Checked: 2010-02-28 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a
|
||||
// Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||
ERlvCmdRet RlvHandler::onAddRemDetach(const RlvCommand& rlvCmd, bool& fRefCount)
|
||||
{
|
||||
RLV_ASSERT( (RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType()) );
|
||||
@@ -1608,7 +1609,10 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
|
||||
{
|
||||
F32 nValue = (rlvCmdOption.m_nPelvisToFoot - gAgentAvatarp->getPelvisToFoot()) * rlvCmdOption.m_nPelvisToFootDeltaMult;
|
||||
nValue += rlvCmdOption.m_nPelvisToFootOffset;
|
||||
gSavedSettings.setF32(RLV_SETTING_AVATAROFFSET_Z, llclamp<F32>(nValue, -1.0f, 1.0f));
|
||||
if (!gAgentAvatarp->isUsingServerBakes())
|
||||
gSavedSettings.setF32(RLV_SETTING_AVATAROFFSET_Z, llclamp<F32>(nValue, -1.0f, 1.0f));
|
||||
else
|
||||
eRet = RLV_RET_FAILED_DISABLED;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1665,7 +1669,7 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
|
||||
return eRet;
|
||||
}
|
||||
|
||||
// Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c
|
||||
// Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
|
||||
ERlvCmdRet RlvHandler::onForceRemAttach(const RlvCommand& rlvCmd) const
|
||||
{
|
||||
RLV_ASSERT(RLV_TYPE_FORCE == rlvCmd.getParamType());
|
||||
@@ -1700,7 +1704,7 @@ ERlvCmdRet RlvHandler::onForceRemAttach(const RlvCommand& rlvCmd) const
|
||||
return RLV_RET_FAILED_OPTION;
|
||||
}
|
||||
|
||||
// Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c
|
||||
// Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
|
||||
ERlvCmdRet RlvHandler::onForceRemOutfit(const RlvCommand& rlvCmd) const
|
||||
{
|
||||
RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption());
|
||||
@@ -1739,14 +1743,7 @@ ERlvCmdRet RlvHandler::onForceGroup(const RlvCommand& rlvCmd) const
|
||||
if (fValid)
|
||||
{
|
||||
m_idAgentGroup = idGroup;
|
||||
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_ActivateGroup);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_GroupID, idGroup);
|
||||
gAgent.sendReliableMessage();
|
||||
LLGroupActions::activate(idGroup);
|
||||
}
|
||||
|
||||
return (fValid) ? RLV_RET_SUCCESS : RLV_RET_FAILED_OPTION;
|
||||
@@ -1831,7 +1828,7 @@ void RlvHandler::onForceWearCallback(const uuid_vec_t& idItems, ERlvBehaviour eB
|
||||
// Command handlers (RLV_TYPE_REPLY)
|
||||
//
|
||||
|
||||
// Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
|
||||
// Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
{
|
||||
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
|
||||
@@ -1844,12 +1841,12 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
ERlvCmdRet eRet = RLV_RET_SUCCESS; std::string strReply;
|
||||
switch (rlvCmd.getBehaviourType())
|
||||
{
|
||||
case RLV_BHVR_VERSION: // @version=<channel> - Checked: 2010-03-27 (RLVa-1.2.0b)
|
||||
case RLV_BHVR_VERSIONNEW: // @versionnew=<channel> - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.2.0b
|
||||
case RLV_BHVR_VERSION: // @version=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a)
|
||||
case RLV_BHVR_VERSIONNEW: // @versionnew=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.2.0b
|
||||
// NOTE: RLV will respond even if there's an option
|
||||
strReply = RlvStrings::getVersion(RLV_BHVR_VERSION == rlvCmd.getBehaviourType());
|
||||
break;
|
||||
case RLV_BHVR_VERSIONNUM: // @versionnum=<channel> - Checked: 2009-11-26 (RLVa-1.1.0f) | Added: RLVa-1.0.4b
|
||||
case RLV_BHVR_VERSIONNUM: // @versionnum=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.0.4b
|
||||
// NOTE: RLV will respond even if there's an option
|
||||
strReply = RlvStrings::getVersionNum();
|
||||
break;
|
||||
@@ -1886,7 +1883,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
case RLV_BHVR_GETINV: // @getinv[:<path>]=<channel>
|
||||
eRet = onGetInv(rlvCmd, strReply);
|
||||
break;
|
||||
case RLV_BHVR_GETINVWORN: // @getinvworn[:path]=<channel>
|
||||
case RLV_BHVR_GETINVWORN: // @getinvworn[:<path>]=<channel>
|
||||
eRet = onGetInvWorn(rlvCmd, strReply);
|
||||
break;
|
||||
case RLV_BHVR_GETGROUP: // @getgroup=<channel> - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
|
||||
@@ -1915,7 +1912,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
}
|
||||
break;
|
||||
#endif // RLV_EXTENSION_CMD_GETCOMMAND
|
||||
case RLV_BHVR_GETSTATUS: // @getstatus[:<option>]=<channel> - Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
|
||||
case RLV_BHVR_GETSTATUS: // @getstatus[:<option>]=<channel> - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
{
|
||||
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
|
||||
rlv_object_map_t::const_iterator itObj = m_Objects.find(rlvCmd.getObjectID());
|
||||
@@ -1923,7 +1920,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
strReply = itObj->second.getStatusString(rlvCmd.getOption());
|
||||
}
|
||||
break;
|
||||
case RLV_BHVR_GETSTATUSALL: // @getstatusall[:<option>]=<channel> - Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
|
||||
case RLV_BHVR_GETSTATUSALL: // @getstatusall[:<option>]=<channel> - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
{
|
||||
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
|
||||
for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj)
|
||||
@@ -1946,7 +1943,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
return eRet;
|
||||
}
|
||||
|
||||
// Checked: 2010-04-07 (RLVa-1.1.3a) | Modified: RLVa-1.1.0f
|
||||
// Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
ERlvCmdRet RlvHandler::onFindFolder(const RlvCommand& rlvCmd, std::string& strReply) const
|
||||
{
|
||||
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
|
||||
@@ -1989,7 +1986,7 @@ ERlvCmdRet RlvHandler::onFindFolder(const RlvCommand& rlvCmd, std::string& strRe
|
||||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
// Checked: 2010-03-19 (RLVa-1.1.3b) | Modified: RLVa-1.1.0e
|
||||
// Checked: 2010-03-19 (RLVa-1.4.0a) | Modified: RLVa-1.1.0e
|
||||
ERlvCmdRet RlvHandler::onGetAttach(const RlvCommand& rlvCmd, std::string& strReply) const
|
||||
{
|
||||
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
|
||||
@@ -2021,7 +2018,7 @@ ERlvCmdRet RlvHandler::onGetAttach(const RlvCommand& rlvCmd, std::string& strRep
|
||||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
// Checked: 2010-03-19 (RLVa-1.1.3b) | Added: RLVa-1.1.0e
|
||||
// Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
|
||||
ERlvCmdRet RlvHandler::onGetAttachNames(const RlvCommand& rlvCmd, std::string& strReply) const
|
||||
{
|
||||
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
|
||||
@@ -2100,7 +2097,7 @@ ERlvCmdRet RlvHandler::onGetInv(const RlvCommand& rlvCmd, std::string& strReply)
|
||||
|
||||
struct rlv_wear_info { U32 cntWorn, cntTotal, cntChildWorn, cntChildTotal; };
|
||||
|
||||
// Checked: 2010-04-05 (RLVa-1.1.3a) | Modified: RLVa-1.1.0f
|
||||
// Checked: 2010-04-05 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
ERlvCmdRet RlvHandler::onGetInvWorn(const RlvCommand& rlvCmd, std::string& strReply) const
|
||||
{
|
||||
// Sanity check - gAgentAvatarp can't be NULL [see RlvForceWear::isWearingItem()]
|
||||
@@ -2175,7 +2172,7 @@ ERlvCmdRet RlvHandler::onGetInvWorn(const RlvCommand& rlvCmd, std::string& strRe
|
||||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
// Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
|
||||
// Checked: 2010-03-19 (RLVa-1.4.0a) | Modified: RLVa-1.2.0a
|
||||
ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strReply) const
|
||||
{
|
||||
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
|
||||
@@ -2210,7 +2207,7 @@ ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strRep
|
||||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
// Checked: 2009-11-21 (RLVa-1.1.0f) | Added: RLVa-1.1.0e
|
||||
// Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
|
||||
ERlvCmdRet RlvHandler::onGetOutfitNames(const RlvCommand& rlvCmd, std::string& strReply) const
|
||||
{
|
||||
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
bool canShowHoverText(const LLViewerObject* pObj) const; // @showhovertext* command family
|
||||
bool canSendIM(const LLUUID& idRecipient) const; // @sendim and @sendimto
|
||||
bool canSit(LLViewerObject* pObj, const LLVector3& posOffset = LLVector3::zero) const;
|
||||
bool canStartIM(const LLUUID& idRecipient) const; // @startim and @startimto
|
||||
bool canStand() const;
|
||||
bool canTeleportViaLure(const LLUUID& idAgent) const;
|
||||
bool canTouch(const LLViewerObject* pObj, const LLVector3& posOffset = LLVector3::zero) const; // @touch
|
||||
@@ -276,6 +277,15 @@ inline bool RlvHandler::canShowHoverText(const LLViewerObject *pObj) const
|
||||
(isException(RLV_BHVR_SHOWHOVERTEXT, pObj->getID(), RLV_CHECK_PERMISSIVE)) ) );
|
||||
}
|
||||
|
||||
inline bool RlvHandler::canStartIM(const LLUUID& idRecipient) const
|
||||
{
|
||||
// User can start an IM session with "recipient" (could be an agent or a group) if:
|
||||
// - not generally restricted from starting IM sessions (or the recipient is an exception)
|
||||
// - not specifically restricted from starting an IM session with the recipient
|
||||
return
|
||||
( (!hasBehaviour(RLV_BHVR_STARTIM)) || (isException(RLV_BHVR_STARTIM, idRecipient)) ) &&
|
||||
( (!hasBehaviour(RLV_BHVR_STARTIMTO)) || (!isException(RLV_BHVR_STARTIMTO, idRecipient)) );
|
||||
}
|
||||
|
||||
// Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
||||
inline bool RlvHandler::canTeleportViaLure(const LLUUID& idAgent) const
|
||||
|
||||
@@ -162,7 +162,7 @@ void RlvCommand::initLookupTable()
|
||||
"detach", "attach", "addattach", "remattach", "addoutfit", "remoutfit", "sharedwear", "sharedunwear",
|
||||
"unsharedwear", "unsharedunwear", "emote", "sendchat", "recvchat", "recvchatfrom", "recvemote", "recvemotefrom",
|
||||
"redirchat", "rediremote", "chatwhisper", "chatnormal", "chatshout", "sendchannel", "sendim", "sendimto",
|
||||
"recvim", "recvimfrom", "permissive", "notify", "showinv", "showminimap", "showworldmap", "showloc",
|
||||
"recvim", "recvimfrom", "startim", "startimto", "permissive", "notify", "showinv", "showminimap", "showworldmap", "showloc",
|
||||
"shownames", "showhovertext", "showhovertexthud", "showhovertextworld", "showhovertextall", "tplm", "tploc", "tplure",
|
||||
"viewnote", "viewscript", "viewtexture", "acceptpermission", "accepttp", "allowidle", "edit", "editobj", "rez", "fartouch",
|
||||
"interact", "touchthis", "touchattach", "touchattachself", "touchattachother", "touchhud", "touchworld", "touchall",
|
||||
@@ -186,7 +186,7 @@ void RlvCommand::initLookupTable()
|
||||
// RlvCommandOption structures
|
||||
//
|
||||
|
||||
// Checked: 2010-09-28 (RLVa-1.1.3a) | Added: RLVa-1.2.1c
|
||||
// Checked: 2010-09-28 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
|
||||
RlvCommandOptionGeneric::RlvCommandOptionGeneric(const std::string& strOption)
|
||||
{
|
||||
LLWearableType::EType wtType(LLWearableType::WT_INVALID); LLUUID idOption; ERlvAttachGroupType eAttachGroup(RLV_ATTACHGROUP_INVALID);
|
||||
@@ -456,7 +456,7 @@ std::string RlvObject::getStatusString(const std::string& strMatch) const
|
||||
// RlvForceWear
|
||||
//
|
||||
|
||||
// Checked: 2010-04-05 (RLVa-1.1.3b) | Modified: RLVa-1.2.0d
|
||||
// Checked: 2010-04-05 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
|
||||
bool RlvForceWear::isWearingItem(const LLInventoryItem* pItem)
|
||||
{
|
||||
if (pItem)
|
||||
@@ -479,7 +479,7 @@ bool RlvForceWear::isWearingItem(const LLInventoryItem* pItem)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Checked: 2010-03-21 (RLVa-1.1.3a) | Modified: RLVa-1.2.0a
|
||||
// Checked: 2010-03-21 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||
void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAction eAction, EWearFlags eFlags)
|
||||
{
|
||||
// [See LLWearableBridge::wearOnAvatar(): don't wear anything until initial wearables are loaded, can destroy clothing items]
|
||||
@@ -679,7 +679,7 @@ void RlvForceWear::forceDetach(const LLViewerJointAttachment* pAttachPt)
|
||||
}
|
||||
}
|
||||
|
||||
// Checked: 2010-03-19 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a
|
||||
// Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
|
||||
bool RlvForceWear::isForceRemovable(const LLViewerWearable* pWearable, bool fCheckComposite /*=true*/, const LLUUID& idExcept /*=LLUUID::null*/)
|
||||
{
|
||||
// Wearable can be removed by an RLV command if:
|
||||
@@ -739,7 +739,7 @@ void RlvForceWear::forceRemove(const LLViewerWearable* pWearable)
|
||||
}
|
||||
}
|
||||
|
||||
// Checked: 2010-03-19 (RLVa-1.1.3a) | Added: RLVa-1.2.0a
|
||||
// Checked: 2010-03-19 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
void RlvForceWear::forceRemove(LLWearableType::EType wtType)
|
||||
{
|
||||
for (U32 idxWearable = 0, cntWearable = gAgentWearables.getWearableCount(wtType); idxWearable < cntWearable; idxWearable++)
|
||||
@@ -883,7 +883,7 @@ void RlvForceWear::addWearable(const LLViewerInventoryItem* pItem, EWearAction e
|
||||
}
|
||||
}
|
||||
|
||||
// Checked: 2010-08-30 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c
|
||||
// Checked: 2010-08-30 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
|
||||
void RlvForceWear::remWearable(const LLViewerWearable* pWearable)
|
||||
{
|
||||
// Remove it from 'm_addWearables' if it's queued for wearing
|
||||
@@ -903,7 +903,7 @@ void RlvForceWear::remWearable(const LLViewerWearable* pWearable)
|
||||
m_remWearables.push_back(pWearable);
|
||||
}
|
||||
|
||||
// Checked: 2010-09-18 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
|
||||
// Checked: 2010-09-18 (RLVa-1.2.1)
|
||||
void RlvForceWear::done()
|
||||
{
|
||||
// Sanity check - don't go through all the motions below only to find out there's nothing to actually do
|
||||
@@ -1009,7 +1009,7 @@ void RlvForceWear::done()
|
||||
// RlvBehaviourNotifyHandler
|
||||
//
|
||||
|
||||
// Checked: 2010-09-26 (RLVa-1.1.3a) | Modified: RLVa-1.1.3a
|
||||
// Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
RlvBehaviourNotifyHandler::RlvBehaviourNotifyHandler()
|
||||
{
|
||||
// NOTE: the reason we use rlv_command_signal_t instead of the better-suited rlv_behaviour_signal_t is because
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "llinventoryobserver.h"
|
||||
#include "llstartup.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
@@ -243,7 +242,7 @@ bool RlvInventory::getPath(const uuid_vec_t& idItems, LLInventoryModel::cat_arra
|
||||
return (folders.count() != 0);
|
||||
}
|
||||
|
||||
// Checked: 2011-03-28 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
// Checked: 2011-10-06 (RLVa-1.4.2a) | Modified: RLVa-1.4.2a
|
||||
const LLUUID& RlvInventory::getSharedRootID() const
|
||||
{
|
||||
if ( (m_idRlvRoot.isNull()) && (gInventory.isInventoryUsable()) )
|
||||
@@ -322,7 +321,7 @@ LLViewerInventoryCategory* RlvInventory::getSharedFolder(const std::string& strP
|
||||
return pFolder; // If strPath was empty or just a bunch of //// then: pFolder == pRlvRoot
|
||||
}
|
||||
|
||||
// Checked: 2010-03-02 (RLVa-1.1.3a) | Modified: RLVa-0.2.0g
|
||||
// Checked: 2010-03-02 (RLVa-1.2.0a) | Modified: RLVa-0.2.0g
|
||||
std::string RlvInventory::getSharedPath(const LLViewerInventoryCategory* pFolder) const
|
||||
{
|
||||
// Sanity check - no shared root or no folder => no path
|
||||
@@ -380,27 +379,6 @@ S32 RlvInventory::getDirectDescendentsItemCount(const LLInventoryCategory* pFold
|
||||
return cntType;
|
||||
}
|
||||
|
||||
// Checked: 2012-11-28 (RLVa-1.4.8)
|
||||
bool RlvInventory::isGiveToRLVOffer(const LLOfferInfo& offerInfo)
|
||||
{
|
||||
if ( (!RlvSettings::getForbidGiveToRLV()) && (RlvInventory::instance().getSharedRoot()) )
|
||||
{
|
||||
if (offerInfo.mFromObject)
|
||||
{
|
||||
return
|
||||
(IM_TASK_INVENTORY_OFFERED == offerInfo.mIM) &&
|
||||
(LLAssetType::AT_CATEGORY == offerInfo.mType) && (offerInfo.mDesc.find(RLV_PUTINV_PREFIX) == 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return
|
||||
(IM_INVENTORY_OFFERED == offerInfo.mIM) &&
|
||||
(LLAssetType::AT_CATEGORY == offerInfo.mType) && (offerInfo.mDesc.find(RLV_PUTINV_PREFIX) == 0);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// RlvRenameOnWearObserver member functions
|
||||
//
|
||||
@@ -414,7 +392,7 @@ void RlvRenameOnWearObserver::done()
|
||||
doOnIdleOneTime(boost::bind(&RlvRenameOnWearObserver::doneIdle, this));
|
||||
}
|
||||
|
||||
// Checked: 2010-03-14 (RLVa-1.1.3a) | Added: RLVa-1.2.0a
|
||||
// Checked: 2010-03-14 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
void RlvRenameOnWearObserver::doneIdle()
|
||||
{
|
||||
const LLViewerInventoryCategory* pRlvRoot = NULL;
|
||||
@@ -599,7 +577,7 @@ void RlvGiveToRLVAgentOffer::done()
|
||||
doOnIdleOneTime(boost::bind(&RlvGiveToRLVAgentOffer::doneIdle, this));
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.1.3a) | Modified: RLVa-1.2.0e
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
|
||||
void RlvGiveToRLVAgentOffer::doneIdle()
|
||||
{
|
||||
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
|
||||
@@ -680,7 +658,7 @@ const LLUUID& RlvWearableItemCollector::getFoldedParent(const LLUUID& idFolder)
|
||||
return (m_FoldingMap.end() == itFolder) ? idFolder : itFolder->second;
|
||||
}
|
||||
|
||||
// Checked: 2010-09-25 (RLVa-1.1.3a) | Added: RLVa-1.2.1c
|
||||
// Checked: 2010-09-25 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
|
||||
RlvForceWear::EWearAction RlvWearableItemCollector::getWearAction(const LLUUID& idFolder) const
|
||||
{
|
||||
LLUUID idCurFolder(idFolder); std::map<LLUUID, RlvForceWear::EWearAction>::const_iterator itCurFolder;
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#include "rlvhelper.h"
|
||||
#include "rlvlocks.h"
|
||||
|
||||
struct LLOfferInfo;
|
||||
|
||||
// ============================================================================
|
||||
// RlvInventory class declaration
|
||||
//
|
||||
@@ -63,8 +61,6 @@ public:
|
||||
std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const;
|
||||
// Returns TRUE if the supplied folder is a descendent of the #RLV folder
|
||||
bool isSharedFolder(const LLUUID& idFolder);
|
||||
// Returns TRUE if the inventory offer is a "give to #RLV" offer
|
||||
bool isGiveToRLVOffer(const LLOfferInfo& offerInfo);
|
||||
|
||||
/*
|
||||
* Inventory fetching
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h" // LLAvatarActions::profileVisible()
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llhudtext.h" // LLHUDText::refreshAllObjectText()
|
||||
@@ -471,10 +472,10 @@ bool RlvUIEnabler::canViewRegionProperties()
|
||||
}
|
||||
|
||||
// Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
|
||||
/*bool RlvUIEnabler::hasOpenIM(const LLUUID& idAgent)
|
||||
bool RlvUIEnabler::hasOpenIM(const LLUUID& idAgent)
|
||||
{
|
||||
LLUUID idSession = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, idAgent);
|
||||
return (NULL != LLFloaterReg::findInstance("impanel", idSession));
|
||||
return gIMMgr->hasSession(idSession);
|
||||
}
|
||||
|
||||
// Checked: 2011-11-04 (RLVa-1.4.4a) | Modified: RLVa-1.4.4a
|
||||
@@ -486,7 +487,7 @@ bool RlvUIEnabler::hasOpenProfile(const LLUUID& idAgent)
|
||||
|
||||
// Check if the user has the specified agent's profile open
|
||||
return LLAvatarActions::profileVisible(idAgent);
|
||||
}*/
|
||||
}
|
||||
|
||||
// Checked: 2010-09-11 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
|
||||
bool RlvUIEnabler::isBuildEnabled()
|
||||
|
||||
@@ -80,8 +80,8 @@ protected:
|
||||
public:
|
||||
static bool canViewParcelProperties(); // showloc
|
||||
static bool canViewRegionProperties(); // showloc
|
||||
//static bool hasOpenIM(const LLUUID& idAgent); // shownames
|
||||
//static bool hasOpenProfile(const LLUUID& idAgent); // shownames
|
||||
static bool hasOpenIM(const LLUUID& idAgent); // shownames
|
||||
static bool hasOpenProfile(const LLUUID& idAgent); // shownames
|
||||
static bool isBuildEnabled(); // edit and rez
|
||||
|
||||
/*
|
||||
|
||||
@@ -889,7 +889,7 @@ return Leave current function or event handler
|
||||
/* */ Comment:Non-functional commentary or disabled code
|
||||
|
||||
# String literals
|
||||
[two_sided_delimiter_esc .989, .855, .453]
|
||||
" " String literal
|
||||
[double_quotation_marks .989, .855, .453]
|
||||
" String literal
|
||||
|
||||
#functions are supplied by the program now
|
||||
|
||||
@@ -157,9 +157,6 @@
|
||||
<button bottom="-48" follows="right|top" font="SansSerif" halign="center" height="20"
|
||||
label="Search" label_selected="Search" left="121" mouse_opaque="true" name="Search"
|
||||
visible="false" width="95" />
|
||||
<button bottom="-46" follows="right|top" font="SansSerif" halign="center" height="20"
|
||||
label="Place an Ad..." label_selected="Place an Ad..." left="630"
|
||||
mouse_opaque="true" name="Place an Ad..." width="145" />
|
||||
<button bottom="-533" follows="left|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Delete" label_selected="Delete" left="80"
|
||||
mouse_opaque="true" name="Delete" width="80" />
|
||||
|
||||
@@ -134,9 +134,6 @@
|
||||
<button bottom="-48" follows="right|top" font="SansSerif" halign="center" height="20"
|
||||
label="Search" label_selected="Search" left="121" mouse_opaque="true" name="Search"
|
||||
visible="false" width="95" />
|
||||
<button bottom="-46" follows="right|top" font="SansSerif" halign="center" height="20"
|
||||
label="Place an Ad..." label_selected="Place an Ad..." left="630"
|
||||
mouse_opaque="true" name="Place an Ad..." width="145" />
|
||||
<button bottom="-533" follows="left|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Delete" label_selected="Delete" left="80"
|
||||
mouse_opaque="true" name="Delete" width="80" />
|
||||
|
||||
@@ -216,9 +216,6 @@
|
||||
<button bottom="-48" follows="right|top" font="SansSerif" halign="center" height="20"
|
||||
label="Search" label_selected="Search" left="121" mouse_opaque="true" name="Search"
|
||||
visible="false" width="95" />
|
||||
<button bottom="-46" follows="right|top" font="SansSerif" halign="center" height="20"
|
||||
label="Place an Ad..." label_selected="Place an Ad..." left="630"
|
||||
mouse_opaque="true" name="Place an Ad..." width="145" />
|
||||
<button bottom="-533" follows="left|bottom" font="SansSerif" halign="center"
|
||||
height="20" label="Delete" label_selected="Delete" left="80"
|
||||
mouse_opaque="true" name="Delete" width="80" />
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true"
|
||||
can_resize="false" height="520" min_height="0" min_width="0"
|
||||
name="avatarinfo" title="Profile" width="420">
|
||||
<panel bottom="-520" height="486" left="0" name="Panel Avatar" width="430" />
|
||||
<panel bottom="-520" height="498" left="0" name="Panel Avatar" width="430" />
|
||||
</floater>
|
||||
|
||||
@@ -215,6 +215,9 @@
|
||||
name="Delete" width="128">
|
||||
<on_click filter="" function="Inventory.DoToSelected" userdata="delete" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Delete System Folder" mouse_opaque="true" name="Delete System Folder">
|
||||
<on_click function="Inventory.DoToSelected" userdata="delete_system_folder" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator name="Folder Wearables Separator" />
|
||||
<menu_item_call bottom_delta="-18" height="18" label="Wear Items" left="0"
|
||||
mouse_opaque="true" name="Wear Items" width="128">
|
||||
|
||||
@@ -711,6 +711,21 @@ Do you wish to proceed?
|
||||
yestext="Join"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="JoinGroupNoCost"
|
||||
type="alertmodal">
|
||||
You are joining group [NAME].
|
||||
Do you wish to proceed?
|
||||
<tag>group</tag>
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
name="okcancelbuttons"
|
||||
notext="Cancel"
|
||||
yestext="Join"/>
|
||||
</notification>
|
||||
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="JoinGroupCannotAfford"
|
||||
@@ -2352,20 +2367,6 @@ Unable to buy land for the group:
|
||||
You do not have permission to buy land for your active group.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
label="Add Friend"
|
||||
name="AddFriend"
|
||||
type="alertmodal">
|
||||
Friends can give permissions to track each other on the map and receive online status updates.
|
||||
|
||||
Offer friendship to [NAME]?
|
||||
<usetemplate
|
||||
name="okcancelbuttons"
|
||||
notext="Cancel"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
label="Add Friend"
|
||||
@@ -3294,6 +3295,18 @@ To leave a group select the 'Groups...' option from the 'Edit&apo
|
||||
yestext="Join"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alert.tga"
|
||||
name="JoinedTooManyGroups"
|
||||
type="alert">
|
||||
You have reached your maximum number of groups. Please leave some group before joining or creating a new one.
|
||||
<tag>group</tag>
|
||||
<tag>fail</tag>
|
||||
<usetemplate
|
||||
name="okbutton"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alert.tga"
|
||||
name="KickUser"
|
||||
@@ -6660,6 +6673,13 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notify.tga"
|
||||
name="FriendshipOffered"
|
||||
type="notifytip">
|
||||
You have offered friendship to [TO_NAME]
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notify.tga"
|
||||
name="OfferFriendshipNoMessage"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel bottom="-600" height="525" left="350" name="Panel Avatar" width="430">
|
||||
<tab_container bottom="-486" height="490" left="0" mouse_opaque="false" name="tab"
|
||||
<tab_container bottom="-498" height="498" left="0" mouse_opaque="false" name="tab"
|
||||
tab_min_width="50" tab_position="top" width="420">
|
||||
<panel border="true" bottom="-580" follows="left|top|right|bottom" height="525"
|
||||
label="2nd Life" left="1" mouse_opaque="true" name="2nd Life" width="418">
|
||||
@@ -57,14 +57,9 @@
|
||||
mouse_opaque="true" name="Name:" v_pad="0" width="70">
|
||||
Name:
|
||||
</text>
|
||||
<name_editor bevel_style="in" border_style="line"
|
||||
border_thickness="1" bottom="-48" enabled="false" follows="left|top"
|
||||
font="SansSerifSmall" height="16" is_unicode="false" left_delta="75"
|
||||
max_length="254" mouse_opaque="false" name="name"
|
||||
width="180" visible="false" />
|
||||
<line_editor bevel_style="in" border_style="line"
|
||||
border_thickness="1" bottom="-48" enabled="false" follows="left|top"
|
||||
font="SansSerifSmall" height="16" is_unicode="false" left_delta="0"
|
||||
font="SansSerifSmall" height="16" is_unicode="false" left_delta="75"
|
||||
max_length="254" mouse_opaque="false" name="dnname"
|
||||
width="180" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
@@ -129,7 +124,7 @@
|
||||
default_image_name="None" follows="left|top" height="151" label=""
|
||||
left="79" mouse_opaque="true" name="img"
|
||||
tool_tip="Click to choose a picture" width="180" />
|
||||
<button bottom_delta="-37" follows="bottom|left" font="SansSerif" halign="center"
|
||||
<button bottom="-230" follows="bottom|left" font="SansSerif" halign="center"
|
||||
height="32" label="" left_delta="-40" width="32" scale_image="true"
|
||||
image_selected="tool_zoom.tga"
|
||||
image_unselected="tool_zoom.tga"
|
||||
@@ -187,17 +182,17 @@
|
||||
<button bottom="-452" font="SansSerif" halign="center" height="20"
|
||||
label="Add Friend..." label_selected="Add Friend..." left_delta="142"
|
||||
mouse_opaque="true" name="Add Friend..." width="130" />
|
||||
<button bottom_delta="-70" font="SansSerif" halign="center" height="20" label="Pay..."
|
||||
<button bottom="-470" font="SansSerif" halign="center" height="20" label="Pay..."
|
||||
label_selected="Pay..." left="24" mouse_opaque="true" name="Pay..."
|
||||
width="70" />
|
||||
<button bottom_delta="0" font="SansSerif" halign="center" height="20"
|
||||
<button bottom="-470" font="SansSerif" halign="center" height="20"
|
||||
label="Instant Message..." label_selected="Instant Message..."
|
||||
left_delta="71" mouse_opaque="true" name="Instant Message..."
|
||||
tool_tip="Instant Message (IM)" width="140" />
|
||||
<button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Mute"
|
||||
<button bottom="-470" ffont="SansSerif" halign="center" height="20" label="Mute"
|
||||
label_selected="Mute" left_delta="141" mouse_opaque="true" name="Mute"
|
||||
width="60" />
|
||||
<button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Invite to Group"
|
||||
<button bottom="-470" font="SansSerif" halign="center" height="20" label="Invite to Group"
|
||||
label_selected="Invite to Group" left_delta="61" mouse_opaque="true"
|
||||
name="GroupInvite_Button" width="100" />
|
||||
</panel>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<check_box bottom_delta="-20" control_name="TurnAroundWhenWalkingBackwards" follows="top" height="16" label="Turn around when walking backwards" tool_tip="Certain AOs may turn you around even with this disabled." name="turn_around"/>
|
||||
<check_box bottom_delta="-20" control_name="AnnounceSnapshots" follows="top" height="16" label="Announce when someone takes a snapshot" tool_tip="Won't announce for people who hide the fact that they are taking a snapshot." name="announce_snapshots"/>
|
||||
<check_box bottom_delta="-20" control_name="AnnounceStreamMetadata" follows="top" height="16" label="Announce music stream's metadata in local chat when tuned in" tool_tip="When a new song comes on, a message will be displayed in local chat with available information about the track." name="announce_stream_metadata"/>
|
||||
<check_box bottom_delta="-20" control_name="FloaterUnfocusedBackgroundOpaque" follows="top" height="16" label="Make unfocused floaters opaque (requires refocusing each floater to take effect)" tool_tip="When a floater loses focus, it won't turn transparent with this enabled. This may conflict with some skins." name="unfocused_floaters_opaque"/>
|
||||
</panel>
|
||||
<panel border="true" left="1" bottom="-190" height="180" width="500" label="Tags/Colors" name="TagsColors">
|
||||
<!-- Client tag options -->
|
||||
|
||||
@@ -3273,6 +3273,10 @@ The
|
||||
<string name="Region">Region</string>
|
||||
<string name="RegionSettings">Region Settings</string>
|
||||
|
||||
<!-- Multi Preview Floater -->
|
||||
<string name="MultiPreviewTitle">Preview</string>
|
||||
<string name="MultiPropertiesTitle">Properties</string>
|
||||
|
||||
<!-- inventory offer -->
|
||||
<string name="InvOfferAnObjectNamed">An object named</string>
|
||||
<string name="InvOfferOwnedByGroup">owned by the group</string>
|
||||
@@ -4015,6 +4019,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
|
||||
<string name="answering-im">
|
||||
Connecting...
|
||||
</string>
|
||||
<string name="conference-title">
|
||||
Multi-person chat
|
||||
</string>
|
||||
<string name="inventory_item_offered-im">
|
||||
Inventory item offered
|
||||
</string>
|
||||
@@ -4247,6 +4254,8 @@ Try enclosing path to the editor with double quotes.
|
||||
<string name="BeaconMedia">Viewing media beacons (white)</string>
|
||||
<string name="ParticleHiding">Hiding Particles</string>
|
||||
|
||||
<string name="Command_Profile_Label">Profile</string>
|
||||
|
||||
<!-- Pathfinding -->
|
||||
<string name="Pathfinding_Wiki_URL">http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer</string>
|
||||
<string name="Pathfinding_Object_Attr_None">None</string>
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
</combo_box>
|
||||
<button label="Navegar" label_selected="Navegar" name="Browse"/>
|
||||
<button label="Buscar" label_selected="Buscar" name="Search"/>
|
||||
<button label="Poner un Anuncio..." label_selected="Poner un Anuncio..." name="Place an Ad..."/>
|
||||
<button label="Borrar" label_selected="Borrar" name="Delete"/>
|
||||
<scroll_list name="results">
|
||||
<column label="Nombre" name="name"/>
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
</combo_box>
|
||||
<button label="Navegar" label_selected="Navegar" name="Browse"/>
|
||||
<button label="Buscar" label_selected="Buscar" name="Search"/>
|
||||
<button label="Poner un Anuncio..." label_selected="Poner un Anuncio..." name="Place an Ad..."/>
|
||||
<button label="Borrar" label_selected="Borrar" name="Delete"/>
|
||||
<scroll_list name="results">
|
||||
<column label="" name="icon"/>
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
</combo_box>
|
||||
<button label="Navegar" label_selected="Navegar" name="Browse"/>
|
||||
<button label="Buscar" label_selected="Buscar" name="Search"/>
|
||||
<button label="Poner un Anuncio..." label_selected="Poner un Anuncio..." name="Place an Ad..."/>
|
||||
<button label="Borrar" label_selected="Borrar" name="Delete"/>
|
||||
<scroll_list name="results">
|
||||
<column label="" name="icon"/>
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<menu_item_call name="Restore to Last Position" label="Restaurar en el mundo"/>
|
||||
<menu_item_call name="Remove Link" label="Borrar Enlace"/>
|
||||
<menu_item_call name="Delete" label="Borrar"/>
|
||||
<menu_item_call name="Delete System Folder" label="Borrar carpeta del sistema"/>
|
||||
<menu_item_call name="Wear Items" label="Vestirse objetos"/>
|
||||
<menu_item_call name="Add To Outfit" label="Añadir al vestuario"/>
|
||||
<menu_item_call name="Replace Outfit" label="Reemplazar Vestuario"/>
|
||||
|
||||
@@ -391,6 +391,12 @@ Los demás residentes podrán visitar la URL que hayas elegido cuando vean tu pe
|
||||
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Unirse"/>
|
||||
</notification>
|
||||
|
||||
<notification name="JoinGroupNoCost">
|
||||
Vas a entrar al grupo [NAME].
|
||||
¿Quieres seguir?
|
||||
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Entrar"/>
|
||||
</notification>
|
||||
|
||||
<notification name="JoinGroupCannotAfford">
|
||||
Unirse a este grupo cuesta [CURRENCY][COST].
|
||||
No tienes suficientes [CURRENCY] para unirte a este grupo.
|
||||
@@ -1384,13 +1390,6 @@ Aún puedes ver el chat y los MI existentes pulsando 'Ver MI y Chat'.
|
||||
No tienes el permiso de comprar terreno para el grupo que tienes activado actualmente.
|
||||
</notification>
|
||||
|
||||
<notification label="Añadir como amigo" name="AddFriend">
|
||||
Los amigos pueden darse permiso para localizarse en el mapa y para saber si el otro está conectado.
|
||||
|
||||
¿Ofrecer a [NAME] que sea tu amigo?
|
||||
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification label="Añadir como amigo" name="AddFriendWithMessage">
|
||||
Los amigos pueden darse permiso para localizarse en el mapa y para saber si el otro está conectado.
|
||||
|
||||
@@ -1886,6 +1885,11 @@ Se ocultará el chat y los mensajes instantáneos. Los mensajes instantáneos re
|
||||
<usetemplate name="okcancelbuttons" notext="Rehusar" yestext="Entrar"/>
|
||||
</notification>
|
||||
|
||||
<notification name="JoinedTooManyGroups">
|
||||
Has superado tu número máximo de grupos. Por favor, sal de al menos uno de ellos antes de crear uno nuevo o entrar en alguno.
|
||||
<usetemplate name="okbutton" yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification name="KickUser">
|
||||
¿Con qué mensaje se expulsará a este usuario?
|
||||
<form name="form">
|
||||
@@ -3752,7 +3756,11 @@ Por favor, reinténtalo en unos momentos.
|
||||
<button name="Decline" text="Rehusar"/>
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
|
||||
<notification name="FriendshipOffered">
|
||||
Has ofrecido amistad a [TO_NAME]
|
||||
</notification>
|
||||
|
||||
<notification name="OfferFriendshipNoMessage">
|
||||
[NAME] te está ofreciendo amistad.
|
||||
|
||||
|
||||
@@ -287,6 +287,7 @@
|
||||
<string name="connected">Conectado</string>
|
||||
<string name="unavailable">Chat de Voz no disponible en esta ubicación</string>
|
||||
<string name="hang_up">Desconectado del Chat de Voz</string>
|
||||
<string name="conference-title">Chat multi-persona</string>
|
||||
<string name="ScriptTakeMoney">Transferir moneda de tu cuenta</string>
|
||||
<string name="ActOnControlInputs">Actuar en tus controles de entrada</string>
|
||||
<string name="RemapControlInputs">Reconfigurar tus controles de entrada</string>
|
||||
@@ -3223,6 +3224,10 @@ La
|
||||
<string name="Region">Región</string>
|
||||
<string name="RegionSettings">Configuración de Región</string>
|
||||
|
||||
<!-- Multi Preview Floater -->
|
||||
<string name="MultiPreviewTitle">Vista previa</string>
|
||||
<string name="MultiPropertiesTitle">Propiedades</string>
|
||||
|
||||
<!-- inventory offer -->
|
||||
<string name="InvOfferAnObjectNamed">Un objeto llamado</string>
|
||||
<string name="InvOfferOwnedByGroup">propiedad del grupo</string>
|
||||
@@ -4209,6 +4214,8 @@ Intenta entrecomillando el camino al editor.
|
||||
<string name="BeaconMedia">Viendo balizas de medios (blanco)</string>
|
||||
<string name="ParticleHiding">Oocultando PartículasHiding Particlesstring>
|
||||
|
||||
<string name="Command_Profile_Label">Perfil</string>
|
||||
|
||||
<!-- Pathfinding -->
|
||||
<string name="Pathfinding_Wiki_URL">http://wiki.secondlife.com/wiki/Pathfinding_Tools_in_the_Second_Life_Viewer</string>
|
||||
<string name="Pathfinding_Object_Attr_None">Ninguno</string>
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
</combo_box>
|
||||
<button label="Parcourir" label_selected="Parcourir" name="Browse"/>
|
||||
<button label="Rechercher" label_selected="Rechercher" name="Search" width="85"/>
|
||||
<button label="Passer une annonce" label_selected="Passer une annonce" name="Place an Ad..."/>
|
||||
<button label="Supprimer" label_selected="Supprimer" name="Delete"/>
|
||||
<scroll_list name="results">
|
||||
<column label="Nom" name="name"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<menu_item_call name="Restore to Last Position" label="Remettre au dernier emplacement"/>
|
||||
<menu_item_call name="Remove Link" label="Supprimer Lien"/>
|
||||
<menu_item_call name="Delete" label="Supprimer"/>
|
||||
<menu_item_call name="Delete System Folder" label="Supprimer le dossier système"/>
|
||||
<menu_item_call name="Wear Items" label="Porter l'ensemble"/>
|
||||
<menu_item_call name="Add To Outfit" label="Ajouter à l'ensemble"/>
|
||||
<menu_item_call name="Replace Outfit" label="Remplacer l'ensemble"/>
|
||||
|
||||
@@ -264,6 +264,12 @@ Voulez-vous continuer ?
|
||||
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="Rejoindre"/>
|
||||
</notification>
|
||||
|
||||
<notification name="JoinGroupNoCost">
|
||||
Vous vous apprêtez à rejoindre le groupe [NAME].
|
||||
Voulez-vous continuer ?
|
||||
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="Fusionner"/>
|
||||
</notification>
|
||||
|
||||
<notification name="JoinGroupCannotAfford">
|
||||
Rejoindre ce groupe coûte [COST] [CURRENCY].
|
||||
Vous n'avez pas suffisamment de [CURRENCY] pour rejoindre ce groupe.
|
||||
@@ -1130,13 +1136,6 @@ Impossible d'acheter du terrain pour le groupe :
|
||||
Vous n'avez pas le droit d'acheter de terrain pour votre groupe.
|
||||
</notification>
|
||||
|
||||
<notification label="Devenir amis" name="AddFriend">
|
||||
Vous pouvez suivre les déplacements de vos amis sur la carte et voir lorsqu'ils se connectent.
|
||||
|
||||
Proposer à [NAME] de devenir votre ami(e).
|
||||
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification label="Devenir amis" name="AddFriendWithMessage">
|
||||
Vous pouvez suivre les déplacements de vos amis sur la carte et voir lorsqu'ils se connectent.
|
||||
|
||||
@@ -1613,6 +1612,11 @@ Pour quitter un groupe, sélectionnez l'option Groupe dans le menu Éditer.
|
||||
<usetemplate name="okcancelbuttons" notext="Refuser" yestext="Rejoindre"/>
|
||||
</notification>
|
||||
|
||||
<notification name="JoinedTooManyGroups">
|
||||
Vous avez atteint le nombre de groupes maximum. Vous devez en quitter un avant d'en rejoindre ou d'en créer un nouveau.
|
||||
<usetemplate name="okbutton" yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification name="KickUser">
|
||||
Éjecter cet utilisateur avec quel message ?
|
||||
<form name="form">
|
||||
@@ -3385,6 +3389,10 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un(
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
<notification name="FriendshipOffered">
|
||||
Vous avez proposé à [TO_NAME] de devenir votre ami(e)
|
||||
</notification>
|
||||
|
||||
<notification name="OfferFriendshipNoMessage">
|
||||
[NAME] vous demande de devenir son ami.
|
||||
|
||||
|
||||
@@ -455,4 +455,16 @@
|
||||
<string name="choose_the_directory">
|
||||
Choisir le répertoire
|
||||
</string>
|
||||
<string name="conference-title">
|
||||
Chat à plusieurs
|
||||
</string>
|
||||
<string name="MultiPreviewTitle">
|
||||
Prévisualiser
|
||||
</string>
|
||||
<string name="MultiPropertiesTitle">
|
||||
Propriétés
|
||||
</string>
|
||||
<string name="Command_Profile_Label">
|
||||
Profil
|
||||
</string>
|
||||
</strings>
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
</combo_box>
|
||||
<button label="Procura" label_selected="Procura" name="Browse"/>
|
||||
<button label="Buscar" label_selected="Buscar" name="Search"/>
|
||||
<button label="Colocar Anúncio..." label_selected="Colocar Anúncio..." name="Place an Ad..."/>
|
||||
<button label="Apagar" label_selected="Apagar" name="Delete"/>
|
||||
<scroll_list name="results">
|
||||
<column label="Nome" name="name"/>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<menu_item_call label="Copiar" name="Copy"/>
|
||||
<menu_item_call label="Colar" name="Paste"/>
|
||||
<menu_item_call label="Apagar" name="Delete"/>
|
||||
<menu_item_call label="Excluir pasta do sistema" name="Delete System Folder"/>
|
||||
<menu_item_call label="Remover os itens" name="Take Off Items"/>
|
||||
<menu_item_call label="Adicionar ao equipamento" name="Add To Outfit"/>
|
||||
<menu_item_call label="Substituir equipamento" name="Replace Outfit"/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user