summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llavataractions.cpp16
-rwxr-xr-xindra/newview/llavatariconctrl.cpp2
-rw-r--r--indra/newview/llavatarlist.cpp9
-rw-r--r--indra/newview/llavatarlistitem.cpp4
-rw-r--r--indra/newview/llcallingcard.cpp6
-rw-r--r--indra/newview/llchathistory.cpp14
-rw-r--r--indra/newview/llconversationmodel.cpp5
-rwxr-xr-xindra/newview/llconversationview.cpp3
-rw-r--r--indra/newview/llfavoritesbar.cpp10
-rw-r--r--indra/newview/llfloateravatarpicker.cpp12
-rw-r--r--indra/newview/llfloaterdisplayname.cpp10
-rw-r--r--indra/newview/llfloaterimcontainer.cpp20
-rw-r--r--indra/newview/llfloaterimcontainer.h2
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp2
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp5
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp10
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp15
-rw-r--r--indra/newview/llfloatersellland.cpp2
-rw-r--r--indra/newview/llfloatertopobjects.cpp14
-rw-r--r--indra/newview/llfloatervoicevolume.cpp2
-rw-r--r--indra/newview/llfriendcard.cpp2
-rw-r--r--indra/newview/llimview.cpp104
-rw-r--r--indra/newview/llinspectavatar.cpp6
-rw-r--r--indra/newview/llinventorybridge.cpp5
-rw-r--r--indra/newview/llnamelistctrl.cpp4
-rw-r--r--indra/newview/llpanelblockedlist.cpp2
-rw-r--r--indra/newview/llpanelgroupinvite.cpp4
-rw-r--r--indra/newview/llpanelgroupnotices.cpp5
-rw-r--r--indra/newview/llpanelgrouproles.cpp4
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp10
-rw-r--r--indra/newview/llpanelobjectinventory.cpp11
-rw-r--r--indra/newview/llparticipantlist.cpp2
-rwxr-xr-xindra/newview/llstartup.cpp2
-rw-r--r--indra/newview/lltoastgroupnotifypanel.cpp6
-rw-r--r--indra/newview/lltoolpie.cpp3
-rw-r--r--indra/newview/llviewerdisplayname.cpp6
-rw-r--r--indra/newview/llviewermenu.cpp6
-rwxr-xr-xindra/newview/llviewermessage.cpp15
-rwxr-xr-xindra/newview/llvoavatar.cpp24
-rw-r--r--indra/newview/llvoicevivox.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml17
42 files changed, 226 insertions, 190 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ece711a128..423e5a00df 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12648,6 +12648,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>UsePeopleAPI</key>
+ <map>
+ <key>Comment</key>
+ <string>Use the people API cap for avatar name fetching, use old legacy protocol if false. Requires restart.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>UseStartScreen</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 1969a0bc5f..59b862503c 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -135,7 +135,7 @@ void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
LLAvatarName av_name;
if(LLAvatarNameCache::get(agent_id, &av_name))
{
- args["NAME"] = av_name.mDisplayName;
+ args["NAME"] = av_name.getDisplayName();
}
msgType = "RemoveFromFriends";
@@ -180,7 +180,7 @@ void LLAvatarActions::offerTeleport(const uuid_vec_t& ids)
static void on_avatar_name_cache_start_im(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
- std::string name = av_name.mDisplayName;
+ std::string name = av_name.getDisplayName();
LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id);
if (session_id != LLUUID::null)
{
@@ -215,7 +215,7 @@ void LLAvatarActions::endIM(const LLUUID& id)
static void on_avatar_name_cache_start_call(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
- std::string name = av_name.mDisplayName;
+ std::string name = av_name.getDisplayName();
LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id, true);
if (session_id != LLUUID::null)
{
@@ -315,11 +315,7 @@ static const char* get_profile_floater_name(const LLUUID& avatar_id)
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
{
- std::string username = av_name.mUsername;
- if (username.empty())
- {
- username = LLCacheName::buildUsername(av_name.mDisplayName);
- }
+ std::string username = av_name.getUserName();
llinfos << "opening web profile for " << username << llendl;
std::string url = getProfileURL(username);
@@ -379,7 +375,7 @@ void LLAvatarActions::showOnMap(const LLUUID& id)
return;
}
- gFloaterWorldMap->trackAvatar(id, av_name.mDisplayName);
+ gFloaterWorldMap->trackAvatar(id, av_name.getDisplayName());
LLFloaterReg::showInstance("world_map");
}
@@ -709,7 +705,7 @@ void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_name
const std::string& separator = LLTrans::getString("words_separator");
for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; )
{
- residents_string.append((*it).mDisplayName);
+ residents_string.append((*it).getDisplayName());
if (++it == avatar_names.end())
{
break;
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index b7278d4a3a..0db38c947c 100755
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -318,7 +318,7 @@ void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarN
{
// Most avatar icon controls are next to a UI element that shows
// a display name, so only show username.
- mFullName = av_name.mUsername;
+ mFullName = av_name.getUserName();
if (mDrawTooltip)
{
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 771419f60a..e54e47180f 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -278,7 +278,7 @@ void LLAvatarList::refresh()
LLAvatarName av_name;
have_names &= LLAvatarNameCache::get(buddy_id, &av_name);
- if (!have_filter || findInsensitive(av_name.mDisplayName, mNameFilter))
+ if (!have_filter || findInsensitive(av_name.getDisplayName(), mNameFilter))
{
if (nadded >= ADD_LIMIT)
{
@@ -296,8 +296,9 @@ void LLAvatarList::refresh()
}
else
{
+ std::string display_name = av_name.getDisplayName();
addNewItem(buddy_id,
- av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName,
+ display_name.empty() ? waiting_str : display_name,
LLAvatarTracker::instance().isBuddyOnline(buddy_id));
}
@@ -325,7 +326,7 @@ void LLAvatarList::refresh()
const LLUUID& buddy_id = it->asUUID();
LLAvatarName av_name;
have_names &= LLAvatarNameCache::get(buddy_id, &av_name);
- if (!findInsensitive(av_name.mDisplayName, mNameFilter))
+ if (!findInsensitive(av_name.getDisplayName(), mNameFilter))
{
removeItemByUUID(buddy_id);
modified = true;
@@ -398,7 +399,7 @@ bool LLAvatarList::filterHasMatches()
// If name has not been loaded yet we consider it as a match.
// When the name will be loaded the filter will be applied again(in refresh()).
- if (have_name && !findInsensitive(av_name.mDisplayName, mNameFilter))
+ if (have_name && !findInsensitive(av_name.getDisplayName(), mNameFilter))
{
continue;
}
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 7ff1b39573..84e177d4a4 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -449,8 +449,8 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin
void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
{
- setAvatarName(av_name.mDisplayName);
- setAvatarToolTip(av_name.mUsername);
+ setAvatarName(av_name.getDisplayName());
+ setAvatarToolTip(av_name.getUserName());
//requesting the list to resort
notifyParent(LLSD().with("sort", LLSD()));
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 60d60abd45..9a295faa73 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -723,7 +723,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id,
// Popup a notify box with online status of this agent
// Use display name only because this user is your friend
LLSD args;
- args["NAME"] = av_name.mDisplayName;
+ args["NAME"] = av_name.getDisplayName();
args["STATUS"] = online ? LLTrans::getString("OnlineStatus") : LLTrans::getString("OfflineStatus");
LLNotificationPtr notification;
@@ -869,7 +869,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
{
LLAvatarName av_name;
LLAvatarNameCache::get( buddy_id, &av_name);
- buddy_map_t::value_type value(av_name.mDisplayName, buddy_id);
+ buddy_map_t::value_type value(av_name.getDisplayName(), buddy_id);
if(buddy->isOnline() && buddy->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION))
{
mMappable.insert(value);
@@ -892,7 +892,7 @@ bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* bud
{
LLAvatarName av_name;
LLAvatarNameCache::get(buddy_id, &av_name);
- mFullName = av_name.mDisplayName;
+ mFullName = av_name.getDisplayName();
buddy_map_t::value_type value(mFullName, buddy_id);
if(buddy->isOnline())
{
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index a33bd88273..3e25d9c457 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -553,15 +553,15 @@ private:
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
{
- mFrom = av_name.mDisplayName;
+ mFrom = av_name.getDisplayName();
LLTextBox* user_name = getChild<LLTextBox>("user_name");
- user_name->setValue( LLSD(av_name.mDisplayName ) );
- user_name->setToolTip( av_name.mUsername );
+ user_name->setValue( LLSD(av_name.getDisplayName() ) );
+ user_name->setToolTip( av_name.getUserName() );
if (gSavedSettings.getBOOL("NameTagShowUsernames") &&
- LLAvatarNameCache::useDisplayNames() &&
- !av_name.mIsDisplayNameDefault)
+ av_name.useDisplayNames() &&
+ !av_name.isDisplayNameDefault())
{
LLStyle::Params style_params_name;
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
@@ -569,9 +569,9 @@ private:
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
style_params_name.readonly_color(userNameColor);
- user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name);
+ user_name->appendText(" - " + av_name.getUserName(), FALSE, style_params_name);
}
- setToolTip( av_name.mUsername );
+ setToolTip( av_name.getUserName() );
// name might have changed, update width
updateMinUserNameWidth();
}
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 4328c60b1a..99dd35a9e8 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -393,6 +393,7 @@ LLConversationItemParticipant::LLConversationItemParticipant(std::string display
mDistToAgent(-1.0),
mAvatarNameCacheConnection()
{
+ mDisplayName = display_name;
mConvType = CONV_PARTICIPANT;
}
@@ -444,8 +445,8 @@ void LLConversationItemParticipant::buildContextMenu(LLMenuGL& menu, U32 flags)
void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_name)
{
- mName = (av_name.mUsername.empty() ? av_name.mDisplayName : av_name.mUsername);
- mDisplayName = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName);
+ mName = av_name.getUserName();
+ mDisplayName = av_name.getDisplayName();
mNeedsRefresh = true;
if(mParent != NULL)
{
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index b964cee09f..f088a8c084 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -472,6 +472,9 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height)
mAvatarIcon->getRect().mBottom);
mAvatarIcon->setShape(avatarRect);
+ //Since dimensions changed, adjust the children (info button, speaker indicator)
+ updateChildren();
+
return arranged;
}
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index c68577db75..ff0e01a200 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -1520,8 +1520,8 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
LLAvatarName av_name;
LLAvatarNameCache::get( gAgentID, &av_name );
- lldebugs << "Saved favorites for " << av_name.getLegacyName() << llendl;
- fav_llsd[av_name.getLegacyName()] = user_llsd;
+ lldebugs << "Saved favorites for " << av_name.getUserName() << llendl;
+ fav_llsd[av_name.getUserName()] = user_llsd;
llofstream file;
file.open(filename);
@@ -1539,10 +1539,10 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser()
LLAvatarName av_name;
LLAvatarNameCache::get( gAgentID, &av_name );
- lldebugs << "Removed favorites for " << av_name.getLegacyName() << llendl;
- if (fav_llsd.has(av_name.getLegacyName()))
+ lldebugs << "Removed favorites for " << av_name.getUserName() << llendl;
+ if (fav_llsd.has(av_name.getUserName()))
{
- fav_llsd.erase(av_name.getLegacyName());
+ fav_llsd.erase(av_name.getUserName());
}
llofstream out_file;
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 6ada809cdb..f7dd4a4a6b 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -307,9 +307,9 @@ void LLFloaterAvatarPicker::populateNearMe()
else
{
element["columns"][0]["column"] = "name";
- element["columns"][0]["value"] = av_name.mDisplayName;
+ element["columns"][0]["value"] = av_name.getDisplayName();
element["columns"][1]["column"] = "username";
- element["columns"][1]["value"] = av_name.mUsername;
+ element["columns"][1]["value"] = av_name.getUserName();
sAvatarNameMap[av] = av_name;
}
@@ -505,9 +505,7 @@ void LLFloaterAvatarPicker::find()
LLViewerRegion* region = gAgent.getRegion();
url = region->getCapability("AvatarPickerSearch");
// Prefer use of capabilities to search on both SLID and display name
- // but allow display name search to be manually turned off for test
- if (!url.empty()
- && LLAvatarNameCache::useDisplayNames())
+ if (!url.empty())
{
// capability urls don't end in '/', but we need one to parse
// query parameters correctly
@@ -679,9 +677,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
found_one = TRUE;
LLAvatarName av_name;
- av_name.mLegacyFirstName = first_name;
- av_name.mLegacyLastName = last_name;
- av_name.mDisplayName = avatar_name;
+ av_name.fromString(avatar_name);
const LLUUID& agent_id = avatar_id;
sAvatarNameMap[agent_id] = av_name;
diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp
index ac8f107928..be1ee77152 100644
--- a/indra/newview/llfloaterdisplayname.cpp
+++ b/indra/newview/llfloaterdisplayname.cpp
@@ -164,10 +164,9 @@ void LLFloaterDisplayName::onCancel()
void LLFloaterDisplayName::onReset()
{
- if (LLAvatarNameCache::useDisplayNames())
+ if (LLAvatarNameCache::hasNameLookupURL())
{
- LLViewerDisplayName::set("",
- boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3));
+ LLViewerDisplayName::set("",boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3));
}
else
{
@@ -199,10 +198,9 @@ void LLFloaterDisplayName::onSave()
return;
}
- if (LLAvatarNameCache::useDisplayNames())
+ if (LLAvatarNameCache::hasNameLookupURL())
{
- LLViewerDisplayName::set(display_name_utf8,
- boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3));
+ LLViewerDisplayName::set(display_name_utf8,boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3));
}
else
{
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index b8a37da3fa..9e13875d20 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -206,6 +206,7 @@ BOOL LLFloaterIMContainer::postBuild()
mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onExpandCollapseButtonClicked, this));
mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");
mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));
+ getChild<LLButton>("speak_btn")->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this));
childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
@@ -341,6 +342,11 @@ void LLFloaterIMContainer::onStubCollapseButtonClicked()
collapseMessagesPane(true);
}
+void LLFloaterIMContainer::onSpeakButtonClicked()
+{
+ LLAgent::toggleMicrophone("speak");
+ updateSpeakBtnState();
+}
void LLFloaterIMContainer::onExpandCollapseButtonClicked()
{
if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()
@@ -913,7 +919,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
}
else if ("im" == command)
{
- LLAvatarActions::startIM(userID);
+ if (gAgent.getID() != userID)
+ {
+ LLAvatarActions::startIM(userID);
+ }
}
else if ("offer_teleport" == command)
{
@@ -1650,7 +1659,7 @@ void LLFloaterIMContainer::openNearbyChat()
LLConversationViewSession* nearby_chat = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,LLUUID()));
if (nearby_chat)
{
- selectConversation(LLUUID());
+ reSelectConversation();
nearby_chat->setOpen(TRUE);
}
}
@@ -1672,6 +1681,13 @@ void LLFloaterIMContainer::reSelectConversation()
}
}
+void LLFloaterIMContainer::updateSpeakBtnState()
+{
+ LLButton* mSpeakBtn = getChild<LLButton>("speak_btn");
+ mSpeakBtn->setToggleState(LLVoiceClient::getInstance()->getUserPTTState());
+ mSpeakBtn->setEnabled(LLAgent::isActionAllowed("speak"));
+}
+
void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes)
{
//Finds the conversation line item to flash using the session_id
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index c9987bffe8..92985c036a 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -117,6 +117,7 @@ private:
void onExpandCollapseButtonClicked();
void onStubCollapseButtonClicked();
void processParticipantsStyleUpdate();
+ void onSpeakButtonClicked();
void collapseConversationsPane(bool collapse);
@@ -172,6 +173,7 @@ public:
void setTimeNow(const LLUUID& session_id, const LLUUID& participant_id);
void setNearbyDistances();
void reSelectConversation();
+ void updateSpeakBtnState();
void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes);
private:
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 80a41e2f37..a9a3611970 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -544,7 +544,7 @@ void LLFloaterIMNearbyChat::addMessage(const LLChat& chat,bool archive,const LLS
LLAvatarName av_name;
LLAvatarNameCache::get(chat.mFromID, &av_name);
- if (!av_name.mIsDisplayNameDefault)
+ if (!av_name.isDisplayNameDefault())
{
from_name = av_name.getCompleteName();
}
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 903c903381..f64cfd0245 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -557,7 +557,10 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
// Send event on to LLEventStream
sChatWatcher->post(chat);
- if( nearby_chat->isInVisibleChain()
+ LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+
+ if( nearby_chat->hasFocus()
+ || im_box->hasFocus()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
|| mChannel.isDead()
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index b50b8c2d32..4c6d8fa5a0 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -167,12 +167,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id)
if (!conversp->isNearbyChat()
|| gSavedSettings.getBOOL("NearbyChatIsNotTornOff"))
{
- floater_container->addFloater(conversp, FALSE, LLTabContainer::END);
-
- if (!floater_container->getVisible())
- {
- LLFloaterReg::toggleInstanceOrBringToFront("im_container");
- }
+ floater_container->addFloater(conversp, !floater_container->getVisible(), LLTabContainer::RIGHT_OF_CURRENT);
}
else
{
@@ -698,7 +693,8 @@ void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive)
voiceButton->setToolTip(
callIsActive? getString("end_call_button_tooltip") : getString("start_call_button_tooltip"));
- enableDisableCallBtn();
+ LLFloaterIMContainer::getInstance()->updateSpeakBtnState();
+ enableDisableCallBtn();
}
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index a50907601c..8d8bba7b17 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -602,15 +602,7 @@ void LLPanelScriptLimitsRegionMemory::onNameCache(
return;
}
- std::string name;
- if (LLAvatarNameCache::useDisplayNames())
- {
- name = LLCacheName::buildUsername(full_name);
- }
- else
- {
- name = full_name;
- }
+ std::string name = LLCacheName::buildUsername(full_name);
std::vector<LLSD>::iterator id_itor;
for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor)
@@ -713,10 +705,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
else
{
name_is_cached = gCacheName->getFullName(owner_id, owner_buf); // username
- if (LLAvatarNameCache::useDisplayNames())
- {
- owner_buf = LLCacheName::buildUsername(owner_buf);
- }
+ owner_buf = LLCacheName::buildUsername(owner_buf);
}
if(!name_is_cached)
{
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 484ecbcd04..c97a6792f3 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -238,7 +238,7 @@ void LLFloaterSellLandUI::updateParcelInfo()
void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name)
{
getChild<LLUICtrl>("sell_to_agent")->setValue(av_name.getCompleteName());
- getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.mUsername);
+ getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.getUserName());
}
void LLFloaterSellLandUI::setBadge(const char* id, Badge badge)
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 2d91a61b54..7530c72dd2 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -199,17 +199,9 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
// Owner names can have trailing spaces sent from server
LLStringUtil::trim(owner_buf);
- if (LLAvatarNameCache::useDisplayNames())
- {
- // ...convert hard-coded name from server to a username
- // *TODO: Send owner_id from server and look up display name
- owner_buf = LLCacheName::buildUsername(owner_buf);
- }
- else
- {
- // ...just strip out legacy "Resident" name
- owner_buf = LLCacheName::cleanFullName(owner_buf);
- }
+ // *TODO: Send owner_id from server and look up display name
+ owner_buf = LLCacheName::buildUsername(owner_buf);
+
columns[column_num]["column"] = "owner";
columns[column_num]["value"] = owner_buf;
columns[column_num++]["font"] = "SANSSERIF";
diff --git a/indra/newview/llfloatervoicevolume.cpp b/indra/newview/llfloatervoicevolume.cpp
index 87b388b30a..a1df73a065 100644
--- a/indra/newview/llfloatervoicevolume.cpp
+++ b/indra/newview/llfloatervoicevolume.cpp
@@ -151,7 +151,7 @@ void LLFloaterVoiceVolume::updateVolumeControls()
// By convention, we only display and toggle voice mutes, not all mutes
bool is_muted = LLAvatarActions::isVoiceMuted(mAvatarID);
- bool is_linden = LLStringUtil::endsWith(mAvatarName.getLegacyName(), " Linden");
+ bool is_linden = LLStringUtil::endsWith(mAvatarName.getUserName(), " Linden");
mute_btn->setEnabled(!is_linden);
mute_btn->setValue(is_muted);
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index a64ddd185d..0e72fab32c 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -533,7 +533,7 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
bool shouldBeAdded = true;
LLAvatarName av_name;
LLAvatarNameCache::get(avatarID, &av_name);
- const std::string& name = av_name.mUsername;
+ const std::string& name = av_name.getUserName();
lldebugs << "Processing buddy name: " << name
<< ", id: " << avatarID
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 821e62c4e6..4e2ac09dd8 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -30,6 +30,7 @@
#include "llavatarnamecache.h" // IDEVO
#include "llavataractions.h"
+#include "llfloaterconversationlog.h"
#include "llfloaterreg.h"
#include "llfontgl.h"
#include "llgl.h"
@@ -155,57 +156,74 @@ void on_new_message(const LLSD& msg)
// execution of the action
+ LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
+ //session floater not focused (visible or not)
+ bool sessionFloaterNotFocused = session_floater && !session_floater->hasFocus();
+
+ //conversation floater not focused (visible or not)
+ bool conversationFloaterNotFocused = im_box && !im_box->hasFocus();
+
if ("toast" == action)
{
// Skip toasting if we have open window of IM with this session id
- LLFloaterIMSession* open_im_floater = LLFloaterIMSession::findInstance(session_id);
if (
- open_im_floater
- && open_im_floater->isInVisibleChain()
- && open_im_floater->hasFocus()
- && !open_im_floater->isMinimized()
- && !(open_im_floater->getHost()
- && open_im_floater->getHost()->isMinimized())
+ session_floater
+ && session_floater->isInVisibleChain()
+ && session_floater->hasFocus()
+ && !session_floater->isMinimized()
+ && !(session_floater->getHost()
+ && session_floater->getHost()->isMinimized())
)
{
return;
}
// Skip toasting for system messages and for nearby chat
- if (participant_id.isNull() || session_id.isNull())
+ if (participant_id.isNull())
{
return;
}
- //Show toast
- LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+ //User is not focused on conversation containing the message
+ if(sessionFloaterNotFocused)
+ {
+ im_box->flashConversationItemWidget(session_id, true);
+
+ //The conversation floater isn't focused/open
+ if(conversationFloaterNotFocused)
+ {
+ gToolBarView->flashCommand(LLCommandId("chat"), true);
+
+ //Show IM toasts (upper right toasts)
+ if(session_id.notNull())
+ {
+ LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+ }
+ }
+ }
}
else if ("flash" == action)
{
- LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- if (im_box)
+ //User is not focused on conversation containing the message
+ if(sessionFloaterNotFocused && conversationFloaterNotFocused)
+ {
+ gToolBarView->flashCommand(LLCommandId("chat"), true);
+ }
+ //conversation floater is open but a different conversation is focused
+ else if(sessionFloaterNotFocused)
{
- im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
+ im_box->flashConversationItemWidget(session_id, true);
}
- gToolBarView->flashCommand(LLCommandId("chat"), true); // flashing of the FUI button "Chat"
}
else if("openconversations" == action)
{
- LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
-
- //Don't flash and show conversation floater when conversation already active (has focus)
- if(session_floater
- && (!session_floater->isInVisibleChain()) //conversation floater not displayed
- ||
- (session_floater->isInVisibleChain() && session_floater->hasFocus() == false)) //conversation floater is displayed but doesn't have focus
-
+ //User is not focused on conversation containing the message
+ if(sessionFloaterNotFocused)
{
//Flash line item
- if (im_box)
- {
- im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
- }
+ im_box->flashConversationItemWidget(session_id, true);
//Surface conversations floater
LLFloaterReg::showInstance("im_container");
@@ -324,7 +342,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name)
{
- if (av_name.mIsTemporaryName)
+ if (!av_name.isValidName())
{
S32 separator_index = mName.rfind(" ");
std::string name = mName.substr(0, separator_index);
@@ -644,15 +662,7 @@ void LLIMModel::LLIMSession::buildHistoryFileName()
// so no need for a callback in LLAvatarNameCache::get()
if (LLAvatarNameCache::get(mOtherParticipantID, &av_name))
{
- if (av_name.mUsername.empty())
- {
- // Display names are off, use mDisplayName which will be the legacy name
- mHistoryFileName = LLCacheName::buildUsername(av_name.mDisplayName);
- }
- else
- {
- mHistoryFileName = av_name.mUsername;
- }
+ mHistoryFileName = LLCacheName::buildUsername(av_name.getUserName());
}
else
{
@@ -854,7 +864,7 @@ bool LLIMModel::logToFile(const std::string& file_name, const std::string& from,
LLAvatarName av_name;
if (!from_id.isNull() &&
LLAvatarNameCache::get(from_id, &av_name) &&
- !av_name.mIsDisplayNameDefault)
+ !av_name.isDisplayNameDefault())
{
from_name = av_name.getCompleteName();
}
@@ -1944,7 +1954,7 @@ void LLOutgoingCallDialog::show(const LLSD& key)
LLAvatarName av_name;
if (LLAvatarNameCache::get(callee_id, &av_name))
{
- final_callee_name = av_name.mDisplayName;
+ final_callee_name = av_name.getDisplayName();
title = av_name.getCompleteName();
}
}
@@ -2467,6 +2477,18 @@ void LLIMMgr::addMessage(
new_session_id = computeSessionID(dialog, other_participant_id);
}
+ // Open conversation log if offline messages are present
+ if (is_offline_msg)
+ {
+ LLFloaterConversationLog* floater_log =
+ LLFloaterReg::getTypedInstance<LLFloaterConversationLog>("conversation");
+ if (floater_log && !(floater_log->isFrontmost()))
+ {
+ floater_log->openFloater();
+ floater_log->setFrontmost(TRUE);
+ }
+ }
+
//*NOTE session_name is empty in case of incoming P2P sessions
std::string fixed_session_name = from;
bool name_is_setted = false;
@@ -2482,7 +2504,7 @@ void LLIMMgr::addMessage(
LLAvatarName av_name;
if (LLAvatarNameCache::get(other_participant_id, &av_name) && !name_is_setted)
{
- fixed_session_name = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName);
+ fixed_session_name = av_name.getDisplayName();
}
LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id, false, is_offline_msg);
@@ -3128,7 +3150,7 @@ void LLIMMgr::noteOfflineUsers(
{
LLUIString offline = LLTrans::getString("offline_message");
// Use display name only because this user is your friend
- offline.setArg("[NAME]", av_name.mDisplayName);
+ offline.setArg("[NAME]", av_name.getDisplayName());
im_model.proccessOnlineOfflineNotification(session_id, offline);
}
}
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 8a15cd279f..3507b729be 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -263,9 +263,9 @@ void LLInspectAvatar::onAvatarNameCache(
{
if (agent_id == mAvatarID)
{
- getChild<LLUICtrl>("user_name")->setValue(av_name.mDisplayName);
- getChild<LLUICtrl>("user_name_small")->setValue(av_name.mDisplayName);
- getChild<LLUICtrl>("user_slid")->setValue(av_name.mUsername);
+ getChild<LLUICtrl>("user_name")->setValue(av_name.getDisplayName());
+ getChild<LLUICtrl>("user_name_small")->setValue(av_name.getDisplayName());
+ getChild<LLUICtrl>("user_slid")->setValue(av_name.getUserName());
mAvatarName = av_name;
// show smaller display name if too long to display in regular size
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index cf8253ca4d..1e60b10a68 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4717,10 +4717,9 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
gCacheName->getFullName(item->getCreatorUUID(), callingcard_name);
// IDEVO
LLAvatarName av_name;
- if (LLAvatarNameCache::useDisplayNames()
- && LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
+ if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
{
- callingcard_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
+ callingcard_name = av_name.getCompleteName();
}
LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
if (session_id != LLUUID::null)
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index b0fbad33b0..855007e403 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -320,7 +320,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
else if (LLAvatarNameCache::get(id, &av_name))
{
if (mShortNames)
- fullname = av_name.mDisplayName;
+ fullname = av_name.getDisplayName();
else
fullname = av_name.getCompleteName();
}
@@ -390,7 +390,7 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
{
std::string name;
if (mShortNames)
- name = av_name.mDisplayName;
+ name = av_name.getDisplayName();
else
name = av_name.getCompleteName();
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 7612af8f5e..b4deb7a920 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -224,7 +224,7 @@ void LLPanelBlockedList::onFilterEdit(const std::string& search_string)
void LLPanelBlockedList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
{
if (names.empty() || ids.empty()) return;
- LLMute mute(ids[0], names[0].getLegacyName(), LLMute::AGENT);
+ LLMute mute(ids[0], names[0].getUserName(), LLMute::AGENT);
LLMuteList::getInstance()->add(mute);
showPanelAndSelect(mute.mID);
}
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 7efeb77e23..a2bbc5400c 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -482,7 +482,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
}
else
{
- names.push_back(av_name.getLegacyName());
+ names.push_back(av_name.getUserName());
}
}
}
@@ -495,7 +495,7 @@ void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const LLAvatarName& a
std::vector<std::string> names;
uuid_vec_t agent_ids;
agent_ids.push_back(id);
- names.push_back(av_name.getLegacyName());
+ names.push_back(av_name.getUserName());
mImplementation->addUsers(names, agent_ids);
}
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 31c0e3d01a..93b108efcc 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -543,10 +543,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
msg->getU32("Data","Timestamp",timestamp,i);
// we only have the legacy name here, convert it to a username
- if (LLAvatarNameCache::useDisplayNames())
- {
- name = LLCacheName::buildUsername(name);
- }
+ name = LLCacheName::buildUsername(name);
LLSD row;
row["id"] = id;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 5720168f81..7ad7e7149b 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1616,7 +1616,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb
}
// trying to avoid unnecessary hash lookups
- if (matchesSearchFilter(av_name.getLegacyName()))
+ if (matchesSearchFilter(av_name.getUserName()))
{
addMemberToList(id, member);
if(!mMembersList->getEnabled())
@@ -1670,7 +1670,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
LLAvatarName av_name;
if (LLAvatarNameCache::get(mMemberProgress->first, &av_name))
{
- if (matchesSearchFilter(av_name.getLegacyName()))
+ if (matchesSearchFilter(av_name.getUserName()))
{
addMemberToList(mMemberProgress->first, mMemberProgress->second);
}
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index 68aefa7fb7..adfb2dee86 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -40,6 +40,8 @@
#define DEBUGGING_FRESHNESS 0
+const LLColor4U DEFAULT_WHITE(255, 255, 255);
+
//
// statics
//
@@ -62,18 +64,24 @@ LLInboxInventoryPanel::~LLInboxInventoryPanel()
LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge)
{
+ LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+
LLInboxFolderViewFolder::Params params;
params.name = bridge->getDisplayName();
params.root = mFolderRoot;
params.listener = bridge;
params.tool_tip = params.name;
+ params.font_color = item_color;
+ params.font_highlight_color = item_color;
return LLUICtrlFactory::create<LLInboxFolderViewFolder>(params);
}
LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge)
{
+ LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+
LLInboxFolderViewItem::Params params;
params.name = bridge->getDisplayName();
@@ -82,6 +90,8 @@ LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * b
params.listener = bridge;
params.rect = LLRect (0, 0, 0, 0);
params.tool_tip = params.name;
+ params.font_color = item_color;
+ params.font_highlight_color = item_color;
return LLUICtrlFactory::create<LLInboxFolderViewItem>(params);
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index de12826452..a2aabb50b5 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -66,6 +66,7 @@
#include "llviewerobjectlist.h"
#include "llviewermessage.h"
+const LLColor4U DEFAULT_WHITE(255, 255, 255);
///----------------------------------------------------------------------------
/// Class LLTaskInvFVBridge
@@ -1719,11 +1720,15 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root
bridge = LLTaskInvFVBridge::createObjectBridge(this, inventory_root);
if(bridge)
{
+ LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+
LLFolderViewFolder::Params p;
p.name = inventory_root->getName();
p.tool_tip = p.name;
p.root = mFolders;
p.listener = bridge;
+ p.font_color = item_color;
+ p.font_highlight_color = item_color;
LLFolderViewFolder* new_folder = LLUICtrlFactory::create<LLFolderViewFolder>(p);
new_folder->addToFolder(mFolders);
@@ -1742,6 +1747,8 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
LLInventoryObject* parent,
LLFolderViewFolder* folder)
{
+ LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+
// Find all in the first pass
LLDynamicArray<obj_folder_pair*> child_categories;
LLTaskInvFVBridge* bridge;
@@ -1767,6 +1774,8 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
p.root = mFolders;
p.listener = bridge;
p.tool_tip = p.name;
+ p.font_color = item_color;
+ p.font_highlight_color = item_color;
view = LLUICtrlFactory::create<LLFolderViewFolder>(p);
child_categories.put(new obj_folder_pair(obj,
(LLFolderViewFolder*)view));
@@ -1780,6 +1789,8 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
params.listener(bridge);
params.rect(LLRect());
params.tool_tip = params.name;
+ params.font_color = item_color;
+ params.font_highlight_color = item_color;
view = LLUICtrlFactory::create<LLFolderViewItem> (params);
}
view->addToFolder(folder);
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 6c838f8a45..c53760bca1 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -381,7 +381,7 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id)
// Create a participant view model instance
LLAvatarName avatar_name;
bool has_name = LLAvatarNameCache::get(avatar_id, &avatar_name);
- participant = new LLConversationItemParticipant(!has_name ? LLTrans::getString("AvatarNameWaiting") : avatar_name.mDisplayName , avatar_id, mRootViewModel);
+ participant = new LLConversationItemParticipant(!has_name ? LLTrans::getString("AvatarNameWaiting") : avatar_name.getDisplayName() , avatar_id, mRootViewModel);
participant->fetchAvatarName();
}
else
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 34259658ea..66a2e6dbda 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2806,7 +2806,7 @@ void LLStartUp::initNameCache()
// Start cache in not-running state until we figure out if we have
// capabilities for display name lookup
- LLAvatarNameCache::initClass(false);
+ LLAvatarNameCache::initClass(false,gSavedSettings.getBOOL("UsePeopleAPI"));
LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames"));
}
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index ed350ea144..4dc0d424ac 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -69,10 +69,8 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi
//header title
std::string from_name = payload["sender_name"].asString();
- if (LLAvatarNameCache::useDisplayNames())
- {
- from_name = LLCacheName::buildUsername(from_name);
- }
+ from_name = LLCacheName::buildUsername(from_name);
+
std::stringstream from;
from << from_name << "/" << groupData.mName;
LLTextBox* pTitleText = getChild<LLTextBox>("title");
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 3cd761b73b..c81f6ace70 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -991,8 +991,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
}
LLAvatarName av_name;
- if (LLAvatarNameCache::useDisplayNames() &&
- LLAvatarNameCache::get(hover_object->getID(), &av_name))
+ if (LLAvatarNameCache::get(hover_object->getID(), &av_name))
{
final_name = av_name.getCompleteName();
}
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index 5741fab29a..4bd38562bc 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -97,7 +97,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
// People API expects array of [ "old value", "new value" ]
LLSD change_array = LLSD::emptyArray();
- change_array.append(av_name.mDisplayName);
+ change_array.append(av_name.getDisplayName());
change_array.append(display_name);
llinfos << "Set name POST to " << cap_url << llendl;
@@ -189,8 +189,8 @@ class LLDisplayNameUpdate : public LLHTTPNode
LLSD args;
args["OLD_NAME"] = old_display_name;
- args["SLID"] = av_name.mUsername;
- args["NEW_NAME"] = av_name.mDisplayName;
+ args["SLID"] = av_name.getUserName();
+ args["NEW_NAME"] = av_name.getDisplayName();
LLNotificationsUtil::add("DisplayNameUpdate", args);
if (agent_id == gAgent.getID())
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 511807ec2f..7ae717cb42 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -8080,11 +8080,7 @@ class LLWorldPostProcess : public view_listener_t
void handle_flush_name_caches()
{
- // Toggle display names on and off to flush
- bool use_display_names = LLAvatarNameCache::useDisplayNames();
- LLAvatarNameCache::setUseDisplayNames(!use_display_names);
- LLAvatarNameCache::setUseDisplayNames(use_display_names);
-
+ LLAvatarNameCache::cleanupClass();
if (gCacheName) gCacheName->clear();
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ea804508c8..5bb7db5c0d 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2246,16 +2246,7 @@ static std::string clean_name_from_task_im(const std::string& msg,
// Don't try to clean up group names
if (!from_group)
{
- if (LLAvatarNameCache::useDisplayNames())
- {
- // ...just convert to username
- final += LLCacheName::buildUsername(name);
- }
- else
- {
- // ...strip out legacy "Resident" name
- final += LLCacheName::cleanFullName(name);
- }
+ final += LLCacheName::buildUsername(name);
}
final += match[3].str();
return final;
@@ -2269,7 +2260,7 @@ void notification_display_name_callback(const LLUUID& id,
LLSD& substitutions,
const LLSD& payload)
{
- substitutions["NAME"] = av_name.mDisplayName;
+ substitutions["NAME"] = av_name.getDisplayName();
LLNotificationsUtil::add(name, substitutions, payload);
}
@@ -3455,7 +3446,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
LLAvatarName av_name;
if (LLAvatarNameCache::get(from_id, &av_name))
{
- chat.mFromName = av_name.mDisplayName;
+ chat.mFromName = av_name.getDisplayName();
}
else
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 220c4ef59a..7cc4e3ed04 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3188,29 +3188,27 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames");
static LLUICachedControl<bool> show_usernames("NameTagShowUsernames");
- if (LLAvatarNameCache::useDisplayNames())
+ if (LLAvatarName::useDisplayNames())
{
LLAvatarName av_name;
if (!LLAvatarNameCache::get(getID(), &av_name))
{
- // ...call this function back when the name arrives
- // and force a rebuild
- LLAvatarNameCache::get(getID(),
- boost::bind(&LLVOAvatar::clearNameTag, this));
+ // ...call this function back when the name arrives and force a rebuild
+ LLAvatarNameCache::get(getID(),boost::bind(&LLVOAvatar::clearNameTag, this));
}
// Might be blank if name not available yet, that's OK
if (show_display_names)
{
- addNameTagLine(av_name.mDisplayName, name_tag_color, LLFontGL::NORMAL,
+ addNameTagLine(av_name.getDisplayName(), name_tag_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerif());
}
// Suppress SLID display if display name matches exactly (ugh)
- if (show_usernames && !av_name.mIsDisplayNameDefault)
+ if (show_usernames && !av_name.isDisplayNameDefault())
{
// *HACK: Desaturate the color
LLColor4 username_color = name_tag_color * 0.83f;
- addNameTagLine(av_name.mUsername, username_color, LLFontGL::NORMAL,
+ addNameTagLine(av_name.getUserName(), username_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerifSmall());
}
}
@@ -3421,20 +3419,18 @@ LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
{
color_name = "NameTagFriend";
}
- else if (LLAvatarNameCache::useDisplayNames())
+ else if (LLAvatarName::useDisplayNames())
{
- // ...color based on whether username "matches" a computed display
- // name
+ // ...color based on whether username "matches" a computed display name
LLAvatarName av_name;
- if (LLAvatarNameCache::get(getID(), &av_name)
- && av_name.mIsDisplayNameDefault)
+ if (LLAvatarNameCache::get(getID(), &av_name) && av_name.isDisplayNameDefault())
{
color_name = "NameTagMatch";
}
else
{
color_name = "NameTagMismatch";
- }
+ }
}
else
{
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 37491e5b58..6fdda12a1c 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -2668,7 +2668,7 @@ void LLVivoxVoiceClient::checkFriend(const LLUUID& id)
// *NOTE: For now, we feed legacy names to Vivox because I don't know
// if their service can support a mix of new and old clients with
// different sorts of names.
- std::string name = av_name.getLegacyName();
+ std::string name = av_name.getUserName();
const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id);
bool canSeeMeOnline = false;
@@ -6200,7 +6200,7 @@ void LLVivoxVoiceClient::lookupName(const LLUUID &id)
void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
- std::string display_name = av_name.mDisplayName;
+ std::string display_name = av_name.getDisplayName();
avatarNameResolved(agent_id, display_name);
}
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 152c897120..9f6503d799 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -32,7 +32,7 @@
top="0"
width="450">
<layout_panel
- auto_resize="true"
+ auto_resize="false"
user_resize="true"
height="430"
name="conversations_layout_panel"
@@ -73,13 +73,26 @@
image_hover_unselected="Toolbar_Middle_Over"
image_overlay="Conv_toolbar_plus"
image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
+ image_unselected="Toolbar_Middle_Off"
layout="topleft"
top="5"
left_pad="4"
name="add_btn"
tool_tip="Start a new conversation"
width="31"/>
+ <button
+ follows="top|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Command_Speak_Icon"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ layout="topleft"
+ top="5"
+ left_pad="4"
+ name="speak_btn"
+ tool_tip="Speak with people using your microphone"
+ width="31"/>
</layout_panel>
<layout_panel
auto_resize="false"