Replace the tricky copy-paste-everywhere Display Name system code with a unified function
Only does that, dun believe me? Take a look, oh... it also corrects improper interpretations of the PhoenixNameSystem value: 1 is both, 2 is displays, 0 and anything else is Legacy. Also replaces a bit of the display name support code with new system... by definition this shouldn't change the log file, only the title of the session.. because of my bad connection during week days, I can not confirm this working 100%, but if it does end up changing the logs under certain unseen conditions, replace the new name check with gCacheName->getFullName(id, name) but this reallllly shouldn't happen!
This commit is contained in:
@@ -24,12 +24,12 @@
|
|||||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
|
|
||||||
#include "llavatarnamecache.h"
|
#include "llavatarnamecache.h"
|
||||||
|
|
||||||
#include "llcachename.h" // we wrap this system
|
#include "llcachename.h" // we wrap this system
|
||||||
|
#include "llcontrol.h" // For LLCachedControl
|
||||||
#include "llframetimer.h"
|
#include "llframetimer.h"
|
||||||
#include "llhttpclient.h"
|
#include "llhttpclient.h"
|
||||||
#include "llsd.h"
|
#include "llsd.h"
|
||||||
@@ -619,7 +619,6 @@ bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name)
|
|||||||
// ...only do immediate lookups when cache is running
|
// ...only do immediate lookups when cache is running
|
||||||
if (useDisplayNames())
|
if (useDisplayNames())
|
||||||
{
|
{
|
||||||
|
|
||||||
// ...use display names cache
|
// ...use display names cache
|
||||||
std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id);
|
std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id);
|
||||||
if (it != sCache.end())
|
if (it != sCache.end())
|
||||||
@@ -664,6 +663,25 @@ bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return true when name has been set to Phoenix Name System Name, if not return false.
|
||||||
|
bool LLAvatarNameCache::getPNSName(const LLUUID& agent_id, std::string& name)
|
||||||
|
{
|
||||||
|
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
||||||
|
LLAvatarName avatar_name;
|
||||||
|
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
||||||
|
{
|
||||||
|
switch (phoenix_name_system)
|
||||||
|
{
|
||||||
|
case 0 : name = avatar_name.getLegacyName(); break;
|
||||||
|
case 1 : name = avatar_name.getCompleteName(); break;
|
||||||
|
case 2 : name = avatar_name.mDisplayName; break;
|
||||||
|
default : name = avatar_name.getLegacyName(); break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void LLAvatarNameCache::fireSignal(const LLUUID& agent_id,
|
void LLAvatarNameCache::fireSignal(const LLUUID& agent_id,
|
||||||
const callback_slot_t& slot,
|
const callback_slot_t& slot,
|
||||||
const LLAvatarName& av_name)
|
const LLAvatarName& av_name)
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ namespace LLAvatarNameCache
|
|||||||
// If name is in cache, returns true and fills in provided LLAvatarName
|
// If name is in cache, returns true and fills in provided LLAvatarName
|
||||||
// otherwise returns false
|
// otherwise returns false
|
||||||
bool get(const LLUUID& agent_id, LLAvatarName *av_name);
|
bool get(const LLUUID& agent_id, LLAvatarName *av_name);
|
||||||
|
// If get() succeeds, returns true and fills in name string according to Phoenix Name System
|
||||||
|
// otherwise returns false
|
||||||
|
bool getPNSName(const LLUUID& agent_id, std::string& name);
|
||||||
|
|
||||||
// Callback types for get() below
|
// Callback types for get() below
|
||||||
typedef boost::signals2::signal<
|
typedef boost::signals2::signal<
|
||||||
|
|||||||
@@ -99,11 +99,6 @@ const F32 OFFLINE_SECONDS = FIND_FREQUENCY + 8.0f;
|
|||||||
// static
|
// static
|
||||||
LLAvatarTracker LLAvatarTracker::sInstance;
|
LLAvatarTracker LLAvatarTracker::sInstance;
|
||||||
|
|
||||||
static void on_avatar_name_cache_notify(const LLUUID& agent_id,
|
|
||||||
const LLAvatarName& av_name,
|
|
||||||
bool online,
|
|
||||||
LLSD payload);
|
|
||||||
|
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
/// Class LLAvatarTracker
|
/// Class LLAvatarTracker
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
@@ -638,21 +633,10 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg)
|
|||||||
{
|
{
|
||||||
if((mBuddyInfo[agent_id]->getRightsGrantedFrom() ^ new_rights) & LLRelationship::GRANT_MODIFY_OBJECTS)
|
if((mBuddyInfo[agent_id]->getRightsGrantedFrom() ^ new_rights) & LLRelationship::GRANT_MODIFY_OBJECTS)
|
||||||
{
|
{
|
||||||
std::string first, last;
|
|
||||||
std::string fullname;
|
std::string fullname;
|
||||||
LLSD args;
|
LLSD args;
|
||||||
LLAvatarName avatar_name;
|
if (LLAvatarNameCache::getPNSName(agent_id, fullname))
|
||||||
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
|
||||||
switch (gSavedSettings.getS32("PhoenixNameSystem"))
|
|
||||||
{
|
|
||||||
case 0 : fullname = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : fullname = avatar_name.mDisplayName; break;
|
|
||||||
default : fullname = avatar_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
args["NAME"] = fullname;
|
args["NAME"] = fullname;
|
||||||
}
|
|
||||||
|
|
||||||
LLSD payload;
|
LLSD payload;
|
||||||
payload["from_id"] = agent_id;
|
payload["from_id"] = agent_id;
|
||||||
@@ -722,9 +706,23 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
|
|||||||
if(chat_notify)
|
if(chat_notify)
|
||||||
{
|
{
|
||||||
// Look up the name of this agent for the notification
|
// Look up the name of this agent for the notification
|
||||||
LLAvatarNameCache::get(agent_id,
|
std::string name;
|
||||||
boost::bind(&on_avatar_name_cache_notify,
|
LLSD args;
|
||||||
_1, _2, online, payload));
|
if (LLAvatarNameCache::getPNSName(agent_id, name))
|
||||||
|
args["NAME"] = name;
|
||||||
|
|
||||||
|
// Popup a notify box with online status of this agent
|
||||||
|
LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args, payload);
|
||||||
|
|
||||||
|
// If there's an open IM session with this agent, send a notification there too.
|
||||||
|
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
|
||||||
|
LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id);
|
||||||
|
if (floater)
|
||||||
|
{
|
||||||
|
std::string notifyMsg = notification->getMessage();
|
||||||
|
if (!notifyMsg.empty())
|
||||||
|
floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mModifyMask |= LLFriendObserver::ONLINE;
|
mModifyMask |= LLFriendObserver::ONLINE;
|
||||||
@@ -733,36 +731,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_avatar_name_cache_notify(const LLUUID& agent_id,
|
|
||||||
const LLAvatarName& av_name,
|
|
||||||
bool online,
|
|
||||||
LLSD payload)
|
|
||||||
{
|
|
||||||
// Popup a notify box with online status of this agent
|
|
||||||
// Use display name only because this user is your friend
|
|
||||||
LLSD args;
|
|
||||||
switch (gSavedSettings.getS32("PhoenixNameSystem"))
|
|
||||||
{
|
|
||||||
case 0 : args["NAME"] = av_name.getLegacyName(); break;
|
|
||||||
case 1 : args["NAME"] = (av_name.mIsDisplayNameDefault ? av_name.mDisplayName : av_name.getCompleteName()); break;
|
|
||||||
case 2 : args["NAME"] = av_name.mDisplayName; break;
|
|
||||||
default : args["NAME"] = av_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Popup a notify box with online status of this agent
|
|
||||||
LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args, payload);
|
|
||||||
|
|
||||||
// If there's an open IM session with this agent, send a notification there too.
|
|
||||||
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
|
|
||||||
LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id);
|
|
||||||
if (floater)
|
|
||||||
{
|
|
||||||
std::string notifyMsg = notification->getMessage();
|
|
||||||
if (!notifyMsg.empty())
|
|
||||||
floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLAvatarTracker::formFriendship(const LLUUID& id)
|
void LLAvatarTracker::formFriendship(const LLUUID& id)
|
||||||
{
|
{
|
||||||
if(id.notNull())
|
if(id.notNull())
|
||||||
|
|||||||
@@ -102,41 +102,18 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const std::string& name, const ESpeakerTy
|
|||||||
|
|
||||||
void LLSpeaker::lookupName()
|
void LLSpeaker::lookupName()
|
||||||
{
|
{
|
||||||
// [Ansariel: Display name support]
|
LLAvatarNameCache::getPNSName(mID, mDisplayName);
|
||||||
LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onAvatarNameLookup, _1, _2, new LLHandle<LLSpeaker>(getHandle())));
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
}
|
|
||||||
|
|
||||||
//static
|
// Also set the legacy name. We will need it to initiate a new
|
||||||
// [Ansariel: Display name support]
|
// IM session.
|
||||||
void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_name, void* user_data)
|
gCacheName->getFullName(mID, mLegacyName);
|
||||||
// [/Ansariel: Display name support]
|
mLegacyName = LLCacheName::cleanFullName(mLegacyName);
|
||||||
{
|
|
||||||
LLSpeaker* speaker_ptr = ((LLHandle<LLSpeaker>*)user_data)->get();
|
|
||||||
delete (LLHandle<LLSpeaker>*)user_data;
|
|
||||||
|
|
||||||
if (speaker_ptr)
|
|
||||||
{
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
switch (gSavedSettings.getS32("PhoenixNameSystem"))
|
|
||||||
{
|
|
||||||
case 0 : speaker_ptr->mDisplayName = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : speaker_ptr->mDisplayName = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : speaker_ptr->mDisplayName = avatar_name.mDisplayName; break;
|
|
||||||
default : speaker_ptr->mDisplayName = avatar_name.getLegacyName(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Also set the legacy name. We will need it to initiate a new
|
|
||||||
// IM session.
|
|
||||||
speaker_ptr->mLegacyName = LLCacheName::cleanFullName(avatar_name.getLegacyName());
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g
|
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g
|
||||||
// TODO-RLVa: this seems to get called per frame which is very likely an LL bug that will eventuall get fixed
|
// TODO-RLVa: this seems to get called per frame which is very likely an LL bug that will eventually get fixed
|
||||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||||
speaker_ptr->mDisplayName = RlvStrings::getAnonym(speaker_ptr->mDisplayName);
|
mDisplayName = RlvStrings::getAnonym(mDisplayName);
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LLSpeakerTextModerationEvent::LLSpeakerTextModerationEvent(LLSpeaker* source)
|
LLSpeakerTextModerationEvent::LLSpeakerTextModerationEvent(LLSpeaker* source)
|
||||||
|
|||||||
@@ -77,11 +77,6 @@ public:
|
|||||||
~LLSpeaker() {};
|
~LLSpeaker() {};
|
||||||
void lookupName();
|
void lookupName();
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
//static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* user_data);
|
|
||||||
static void onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_name, void* user_data);
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
ESpeakerStatus mStatus; // current activity status in speech group
|
ESpeakerStatus mStatus; // current activity status in speech group
|
||||||
F32 mLastSpokeTime; // timestamp when this speaker last spoke
|
F32 mLastSpokeTime; // timestamp when this speaker last spoke
|
||||||
F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?)
|
F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?)
|
||||||
|
|||||||
@@ -457,8 +457,6 @@ void LLFloaterAvatarList::updateAvatarList()
|
|||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string first;
|
|
||||||
std::string last;
|
|
||||||
const LLUUID &avid = avatar_ids[i];
|
const LLUUID &avid = avatar_ids[i];
|
||||||
|
|
||||||
LLVector3d position;
|
LLVector3d position;
|
||||||
@@ -478,24 +476,8 @@ void LLFloaterAvatarList::updateAvatarList()
|
|||||||
position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition());
|
position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition());
|
||||||
name = avatarp->getFullname();
|
name = avatarp->getFullname();
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
if (!LLAvatarNameCache::getPNSName(avatarp->getID(), name))
|
||||||
LLAvatarName avatar_name;
|
continue;
|
||||||
if (LLAvatarNameCache::get(avatarp->getID(), &avatar_name))
|
|
||||||
{
|
|
||||||
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : name = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : name = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : name = avatar_name.mDisplayName; break;
|
|
||||||
default : name = avatar_name.getLegacyName(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
first = avatar_name.mLegacyFirstName;
|
|
||||||
last = avatar_name.mLegacyLastName;
|
|
||||||
}
|
|
||||||
else continue;
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
//duped for lower section
|
//duped for lower section
|
||||||
if (name.empty() || (name.compare(" ") == 0))// || (name.compare(gCacheName->getDefaultName()) == 0))
|
if (name.empty() || (name.compare(" ") == 0))// || (name.compare(gCacheName->getDefaultName()) == 0))
|
||||||
@@ -966,14 +948,12 @@ void LLFloaterAvatarList::onClickIM(void* userdata)
|
|||||||
// Single avatar
|
// Single avatar
|
||||||
LLUUID agent_id = ids[0];
|
LLUUID agent_id = ids[0];
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
std::string avatar_name;
|
||||||
LLAvatarName avatar_name;
|
if (LLAvatarNameCache::getPNSName(agent_id, avatar_name))
|
||||||
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
{
|
||||||
gIMMgr->setFloaterOpen(TRUE);
|
gIMMgr->setFloaterOpen(TRUE);
|
||||||
gIMMgr->addSession(LLCacheName::cleanFullName(avatar_name.getLegacyName()),IM_NOTHING_SPECIAL,agent_id);
|
gIMMgr->addSession(avatar_name,IM_NOTHING_SPECIAL,agent_id);
|
||||||
}
|
}
|
||||||
// [Ansariel: Display name support]
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1120,14 +1100,12 @@ BOOL LLFloaterAvatarList::handleKeyHere(KEY key, MASK mask)
|
|||||||
// Single avatar
|
// Single avatar
|
||||||
LLUUID agent_id = ids[0];
|
LLUUID agent_id = ids[0];
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
std::string avatar_name;
|
||||||
LLAvatarName avatar_name;
|
if (LLAvatarNameCache::getPNSName(agent_id, avatar_name))
|
||||||
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
{
|
||||||
gIMMgr->setFloaterOpen(TRUE);
|
gIMMgr->setFloaterOpen(TRUE);
|
||||||
gIMMgr->addSession(LLCacheName::cleanFullName(avatar_name.getLegacyName()),IM_NOTHING_SPECIAL,agent_id);
|
gIMMgr->addSession(avatar_name,IM_NOTHING_SPECIAL,agent_id);
|
||||||
}
|
}
|
||||||
// [Ansariel: Display name support]
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,10 +44,7 @@
|
|||||||
#include "llagent.h"
|
#include "llagent.h"
|
||||||
#include "llappviewer.h" // for gLastVersionChannel
|
#include "llappviewer.h" // for gLastVersionChannel
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
#include "llavatarname.h"
|
|
||||||
#include "llavatarnamecache.h"
|
#include "llavatarnamecache.h"
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
#include "llfloateravatarpicker.h"
|
#include "llfloateravatarpicker.h"
|
||||||
#include "llviewerwindow.h"
|
#include "llviewerwindow.h"
|
||||||
@@ -421,25 +418,7 @@ BOOL LLPanelFriends::addFriend(const LLUUID& agent_id)
|
|||||||
bool isOnline = relationInfo->isOnline();
|
bool isOnline = relationInfo->isOnline();
|
||||||
|
|
||||||
std::string fullname;
|
std::string fullname;
|
||||||
// [Ansariel: Display name support]
|
BOOL have_name = LLAvatarNameCache::getPNSName(agent_id, fullname);
|
||||||
//BOOL have_name = gCacheName->getFullName(agent_id, fullname);
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
BOOL have_name;
|
|
||||||
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : fullname = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : fullname = avatar_name.mDisplayName; break;
|
|
||||||
default : fullname = avatar_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
have_name = TRUE;
|
|
||||||
}
|
|
||||||
else have_name = FALSE;
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
LLSD element;
|
LLSD element;
|
||||||
element["id"] = agent_id;
|
element["id"] = agent_id;
|
||||||
@@ -521,25 +500,7 @@ BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
|
|||||||
bool isOnline = info->isOnline();
|
bool isOnline = info->isOnline();
|
||||||
|
|
||||||
std::string fullname;
|
std::string fullname;
|
||||||
// [Ansariel: Display name support]
|
BOOL have_name = LLAvatarNameCache::getPNSName(agent_id, fullname);
|
||||||
//BOOL have_name = gCacheName->getFullName(agent_id, fullname);
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
BOOL have_name;
|
|
||||||
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : fullname = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : fullname = avatar_name.mDisplayName; break;
|
|
||||||
default : fullname = avatar_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
have_name = TRUE;
|
|
||||||
}
|
|
||||||
else have_name = FALSE;
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
// Name of the status icon to use
|
// Name of the status icon to use
|
||||||
std::string statusIcon;
|
std::string statusIcon;
|
||||||
@@ -892,20 +853,12 @@ void LLPanelFriends::onClickIM(void* user_data)
|
|||||||
{
|
{
|
||||||
LLUUID agent_id = ids[0];
|
LLUUID agent_id = ids[0];
|
||||||
const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(agent_id);
|
const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(agent_id);
|
||||||
// [Ansariel: Display name support]
|
std::string fullname;
|
||||||
//std::string fullname;
|
if(info && gCacheName->getFullName(agent_id, fullname))
|
||||||
//if(info && gCacheName->getFullName(agent_id, fullname))
|
|
||||||
//{
|
|
||||||
// gIMMgr->setFloaterOpen(TRUE);
|
|
||||||
// gIMMgr->addSession(fullname, IM_NOTHING_SPECIAL, agent_id);
|
|
||||||
//}
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
if (info && LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
{
|
||||||
gIMMgr->setFloaterOpen(TRUE);
|
gIMMgr->setFloaterOpen(TRUE);
|
||||||
gIMMgr->addSession(LLCacheName::cleanFullName(avatar_name.getLegacyName()),IM_NOTHING_SPECIAL,agent_id);
|
gIMMgr->addSession(fullname, IM_NOTHING_SPECIAL, agent_id);
|
||||||
}
|
}
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1022,30 +975,9 @@ void LLPanelFriends::onClickRemove(void* user_data)
|
|||||||
if(ids.size() == 1)
|
if(ids.size() == 1)
|
||||||
{
|
{
|
||||||
LLUUID agent_id = ids[0];
|
LLUUID agent_id = ids[0];
|
||||||
// [Ansariel: Display name support]
|
std::string fullname;
|
||||||
//std::string first, last;
|
if (LLAvatarNameCache::getPNSName(agent_id, fullname))
|
||||||
//if(gCacheName->getName(agent_id, first, last))
|
|
||||||
//{
|
|
||||||
// args["FIRST_NAME"] = first;
|
|
||||||
// args["LAST_NAME"] = last;
|
|
||||||
//}
|
|
||||||
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
|
||||||
std::string fullname;
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : fullname = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : fullname = avatar_name.mDisplayName; break;
|
|
||||||
default : fullname = avatar_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
args["NAME"] = fullname;
|
args["NAME"] = fullname;
|
||||||
}
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1289,28 +1221,9 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command
|
|||||||
if(ids.size() == 1)
|
if(ids.size() == 1)
|
||||||
{
|
{
|
||||||
LLUUID agent_id = ids.begin()->first;
|
LLUUID agent_id = ids.begin()->first;
|
||||||
//std::string first, last;
|
std::string fullname;
|
||||||
//if(gCacheName->getName(agent_id, first, last))
|
if (LLAvatarNameCache::getPNSName(agent_id, fullname))
|
||||||
//{
|
|
||||||
// args["FIRST_NAME"] = first;
|
|
||||||
// args["LAST_NAME"] = last;
|
|
||||||
//}
|
|
||||||
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
if (LLAvatarNameCache::get(agent_id, &avatar_name))
|
|
||||||
{
|
|
||||||
std::string fullname;
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : fullname = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : fullname = avatar_name.mDisplayName; break;
|
|
||||||
default : fullname = avatar_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
args["NAME"] = fullname;
|
args["NAME"] = fullname;
|
||||||
}
|
|
||||||
|
|
||||||
if (command == GRANT)
|
if (command == GRANT)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -262,39 +262,16 @@ void LLHoverView::updateText()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
std::string complete_name;
|
||||||
// [Ansariel: Display name support]
|
if (!LLAvatarNameCache::getPNSName(hit_object->getID(), complete_name))
|
||||||
std::string complete_name = firstname->getString();
|
complete_name = firstname->getString() + std::string(" ") + lastname->getString();
|
||||||
complete_name += " ";
|
|
||||||
complete_name += lastname->getString();
|
|
||||||
|
|
||||||
if (LLAvatarNameCache::useDisplayNames())
|
|
||||||
{
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
if (LLAvatarNameCache::get(hit_object->getID(), &avatar_name))
|
|
||||||
{
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
|
|
||||||
{
|
|
||||||
complete_name = avatar_name.mDisplayName;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
complete_name = avatar_name.getCompleteName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
if (title)
|
if (title)
|
||||||
{
|
{
|
||||||
line.append(title->getString());
|
line.append(title->getString());
|
||||||
line.append(1, ' ');
|
line.append(1, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
line += complete_name;
|
line += complete_name;
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||||
}
|
}
|
||||||
@@ -347,27 +324,13 @@ void LLHoverView::updateText()
|
|||||||
std::string name;
|
std::string name;
|
||||||
if (!nodep->mPermissions->isGroupOwned())
|
if (!nodep->mPermissions->isGroupOwned())
|
||||||
{
|
{
|
||||||
// [Ansariel: Display name support]
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
owner = nodep->mPermissions->getOwner();
|
owner = nodep->mPermissions->getOwner();
|
||||||
if (LLUUID::null == owner)
|
if (LLUUID::null == owner)
|
||||||
{
|
{
|
||||||
line.append(LLTrans::getString("TooltipPublic"));
|
line.append(LLTrans::getString("TooltipPublic"));
|
||||||
}
|
}
|
||||||
// [Ansariel: Display name support]
|
else if(LLAvatarNameCache::getPNSName(owner, name))
|
||||||
//else if(gCacheName->getFullName(owner, name))
|
|
||||||
else if (LLAvatarNameCache::get(owner, &avatar_name))
|
|
||||||
{
|
{
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : name = avatar_name.getCompleteName(); break;
|
|
||||||
case 1 : name = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : name = avatar_name.mDisplayName; break;
|
|
||||||
default : name = avatar_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1297,28 +1297,13 @@ void LLFloaterIMPanel::init(const std::string& session_label)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
void LLFloaterIMPanel::lookupName()
|
void LLFloaterIMPanel::lookupName()
|
||||||
{
|
{
|
||||||
LLAvatarNameCache::get(mOtherParticipantUUID, boost::bind(&LLFloaterIMPanel::onAvatarNameLookup, _1, _2, this));
|
std::string title;
|
||||||
|
if (LLAvatarNameCache::getPNSName(mOtherParticipantUUID, title))
|
||||||
|
setTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
|
||||||
void LLFloaterIMPanel::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_name, void* user_data)
|
|
||||||
{
|
|
||||||
LLFloaterIMPanel* self = (LLFloaterIMPanel*)user_data;
|
|
||||||
|
|
||||||
if (self && sFloaterIMPanels.count(self) != 0)
|
|
||||||
{
|
|
||||||
std::string title = avatar_name.getCompleteName();
|
|
||||||
if (!title.empty())
|
|
||||||
{
|
|
||||||
self->setTitle(title);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
LLFloaterIMPanel::~LLFloaterIMPanel()
|
LLFloaterIMPanel::~LLFloaterIMPanel()
|
||||||
{
|
{
|
||||||
// [Ansariel: Display name support]
|
// [Ansariel: Display name support]
|
||||||
@@ -1676,19 +1661,8 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string show_name = name;
|
std::string show_name = name;
|
||||||
LLAvatarName avatar_name;
|
if (source.notNull())
|
||||||
if (source.notNull() &&
|
LLAvatarNameCache::getPNSName(source, show_name);
|
||||||
LLAvatarNameCache::get(source, &avatar_name))
|
|
||||||
{
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : show_name = avatar_name.getCompleteName(); break;
|
|
||||||
case 1 : show_name = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : show_name = avatar_name.mDisplayName; break;
|
|
||||||
default : show_name = avatar_name.getCompleteName(); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Convert the name to a hotlink and add to message.
|
// Convert the name to a hotlink and add to message.
|
||||||
const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source);
|
const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source);
|
||||||
mHistoryEditor->appendStyledText(show_name,false,prepend_newline,source_style);
|
mHistoryEditor->appendStyledText(show_name,false,prepend_newline,source_style);
|
||||||
|
|||||||
@@ -196,10 +196,7 @@ public:
|
|||||||
EInstantMessage dialog);
|
EInstantMessage dialog);
|
||||||
virtual ~LLFloaterIMPanel();
|
virtual ~LLFloaterIMPanel();
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
void lookupName();
|
void lookupName();
|
||||||
static void onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_name, void* user_data);
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
/*virtual*/ BOOL postBuild();
|
/*virtual*/ BOOL postBuild();
|
||||||
|
|
||||||
@@ -400,7 +397,6 @@ private:
|
|||||||
typedef std::map<LLUUID, LLStyleSP> styleMap;
|
typedef std::map<LLUUID, LLStyleSP> styleMap;
|
||||||
static styleMap mStyleMap;
|
static styleMap mStyleMap;
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
static std::set<LLFloaterIMPanel*> sFloaterIMPanels;
|
static std::set<LLFloaterIMPanel*> sFloaterIMPanels;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -627,37 +627,11 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
|
|||||||
{
|
{
|
||||||
msg.assign("");
|
msg.assign("");
|
||||||
std::string fullname;
|
std::string fullname;
|
||||||
if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname))
|
if(mClosestAgentToCursor.notNull() && LLAvatarNameCache::getPNSName(mClosestAgentToCursor, fullname))
|
||||||
{
|
{
|
||||||
//msg.append(fullname);
|
//msg.append(fullname);
|
||||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
|
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
|
||||||
// [Ansariel: Display name support]
|
msg.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname) );
|
||||||
// msg.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname) );
|
|
||||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
|
||||||
{
|
|
||||||
msg.append(RlvStrings::getAnonym(fullname));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (LLAvatarNameCache::useDisplayNames())
|
|
||||||
{
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
if (LLAvatarNameCache::get(mClosestAgentToCursor, &avatar_name))
|
|
||||||
{
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
|
|
||||||
{
|
|
||||||
fullname = avatar_name.mDisplayName;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fullname = avatar_name.getCompleteName(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
msg.append(fullname);
|
|
||||||
}
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
msg.append("\n");
|
msg.append("\n");
|
||||||
|
|
||||||
|
|||||||
@@ -167,21 +167,9 @@ void LLPanelAvatarSecondLife::updatePartnerName()
|
|||||||
{
|
{
|
||||||
if (mPartnerID.notNull())
|
if (mPartnerID.notNull())
|
||||||
{
|
{
|
||||||
// [Ansariel: Display name support]
|
std::string name;
|
||||||
LLAvatarName avatar_name;
|
if (LLAvatarNameCache::getPNSName(mPartnerID, name))
|
||||||
if (LLAvatarNameCache::get(mPartnerID, &avatar_name))
|
|
||||||
{
|
|
||||||
std::string name;
|
|
||||||
switch (gSavedSettings.getS32("PhoenixNameSystem"))
|
|
||||||
{
|
|
||||||
case 0 : name = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : name = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
|
|
||||||
case 2 : name = avatar_name.mDisplayName; break;
|
|
||||||
default : name = avatar_name.getLegacyName(); break;
|
|
||||||
}
|
|
||||||
childSetTextArg("partner_edit", "[NAME]", name);
|
childSetTextArg("partner_edit", "[NAME]", name);
|
||||||
}
|
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
childSetEnabled("partner_info", TRUE);
|
childSetEnabled("partner_info", TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -202,9 +190,7 @@ void LLPanelAvatarSecondLife::clearControls()
|
|||||||
childSetValue("born", "");
|
childSetValue("born", "");
|
||||||
childSetValue("acct", "");
|
childSetValue("acct", "");
|
||||||
|
|
||||||
// [Ansariel: Display name support]
|
|
||||||
childSetTextArg("partner_edit", "[NAME]", LLStringUtil::null);
|
childSetTextArg("partner_edit", "[NAME]", LLStringUtil::null);
|
||||||
// [/Ansariel: Display name support]
|
|
||||||
|
|
||||||
mPartnerID = LLUUID::null;
|
mPartnerID = LLUUID::null;
|
||||||
|
|
||||||
|
|||||||
@@ -3633,29 +3633,11 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// [Ansariel/Henri: Display name support]
|
|
||||||
if (chatter && chatter->isAvatar())
|
if (chatter && chatter->isAvatar())
|
||||||
{
|
{
|
||||||
if (LLAvatarNameCache::useDisplayNames())
|
if (LLAvatarNameCache::getPNSName(from_id, from_name))
|
||||||
{
|
|
||||||
LLAvatarName avatar_name;
|
|
||||||
if (LLAvatarNameCache::get(from_id, &avatar_name))
|
|
||||||
{
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
|
|
||||||
{
|
|
||||||
from_name = avatar_name.mDisplayName;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
from_name = avatar_name.getCompleteName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chat.mFromName = from_name;
|
chat.mFromName = from_name;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// [/Ansariel/Henri: Display name support]
|
|
||||||
|
|
||||||
BOOL visible_in_chat_bubble = FALSE;
|
BOOL visible_in_chat_bubble = FALSE;
|
||||||
std::string verb;
|
std::string verb;
|
||||||
@@ -5833,7 +5815,6 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
|
||||||
std::string source_slurl;
|
std::string source_slurl;
|
||||||
if (is_source_group)
|
if (is_source_group)
|
||||||
{
|
{
|
||||||
@@ -5841,17 +5822,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LLAvatarName avatar_name;
|
LLAvatarNameCache::getPNSName(source_id, source_slurl);
|
||||||
if (LLAvatarNameCache::get(source_id, &avatar_name))
|
|
||||||
{
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : source_slurl = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : source_slurl = avatar_name.getCompleteName(); break;
|
|
||||||
case 2 : source_slurl = avatar_name.mDisplayName; break;
|
|
||||||
default : source_slurl = avatar_name.getLegacyName(); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string dest_slurl;
|
std::string dest_slurl;
|
||||||
@@ -5861,17 +5832,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LLAvatarName avatar_name;
|
LLAvatarNameCache::getPNSName(dest_id, dest_slurl);
|
||||||
if (LLAvatarNameCache::get(dest_id, &avatar_name))
|
|
||||||
{
|
|
||||||
switch (phoenix_name_system)
|
|
||||||
{
|
|
||||||
case 0 : dest_slurl = avatar_name.getLegacyName(); break;
|
|
||||||
case 1 : dest_slurl = avatar_name.getCompleteName(); break;
|
|
||||||
case 2 : dest_slurl = avatar_name.mDisplayName; break;
|
|
||||||
default : dest_slurl = avatar_name.getLegacyName(); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string reason =
|
std::string reason =
|
||||||
|
|||||||
@@ -873,7 +873,7 @@ void send_stats()
|
|||||||
llinfos << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << llendl;
|
llinfos << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << llendl;
|
||||||
llinfos << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << llendl;
|
llinfos << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << llendl;
|
||||||
|
|
||||||
body["DisplayNamesEnabled"] = gSavedSettings.getS32("PhoenixNameSystem") > 0;
|
body["DisplayNamesEnabled"] = gSavedSettings.getS32("PhoenixNameSystem") == 1 || gSavedSettings.getS32("PhoenixNameSystem") == 2;
|
||||||
body["DisplayNamesShowUsername"] = gSavedSettings.getS32("PhoenixNameSystem") == 1;
|
body["DisplayNamesShowUsername"] = gSavedSettings.getS32("PhoenixNameSystem") == 1;
|
||||||
|
|
||||||
body["MinimalSkin"] = false;
|
body["MinimalSkin"] = false;
|
||||||
|
|||||||
@@ -3755,8 +3755,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|
|||||||
|
|
||||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
||||||
|
|
||||||
bool show_display_names = phoenix_name_system > 0;
|
bool show_display_names = phoenix_name_system == 1 || phoenix_name_system == 2;
|
||||||
bool show_usernames = phoenix_name_system < 2;
|
bool show_usernames = phoenix_name_system != 2;
|
||||||
if (show_display_names && LLAvatarNameCache::useDisplayNames())
|
if (show_display_names && LLAvatarNameCache::useDisplayNames())
|
||||||
{
|
{
|
||||||
LLAvatarName av_name;
|
LLAvatarName av_name;
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ void RlvUIEnabler::onToggleShowNames(bool fQuitting)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
LLAvatarNameCache::setForceDisplayNames(false);
|
LLAvatarNameCache::setForceDisplayNames(false);
|
||||||
LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getS32("PhoenixNameSystem") != 0);
|
LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getS32("PhoenixNameSystem") == 1 || gSavedSettings.getS32("PhoenixNameSystem") == 2);
|
||||||
}
|
}
|
||||||
LLVOAvatar::invalidateNameTags(); // See handleDisplayNamesOptionChanged()
|
LLVOAvatar::invalidateNameTags(); // See handleDisplayNamesOptionChanged()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user