summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-20 15:30:59 -0700
committerJames Cook <james@lindenlab.com>2010-05-20 15:30:59 -0700
commitc994a93ed11642fc0fe12c1b743215bf63d852ab (patch)
tree3434880b01bdda4f8d3eec01ad5a93f41ede6b58 /indra/newview
parente47249777b79d9c7576f5df010de92f9bbb4f999 (diff)
DEV-50013 Convert call dialogs to use Display Names
Reviewed with Leyla
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimview.cpp17
-rw-r--r--indra/newview/llvoicevivox.cpp19
-rw-r--r--indra/newview/llvoicevivox.h4
3 files changed, 18 insertions, 22 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index fa8390f5ab..f615402f9c 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1749,7 +1749,7 @@ void LLOutgoingCallDialog::show(const LLSD& key)
// Beautification: Since SLID is in the title bar, and you probably
// recognize this person's voice, just show display name
std::string final_callee_name = callee_name;
- if (is_avatar)
+ if (mPayload["session_type"].asInteger() == LLIMModel::LLIMSession::P2P_SESSION)
{
LLAvatarName av_name;
if (LLAvatarNameCache::get(callee_id, &av_name))
@@ -1957,8 +1957,9 @@ void LLIncomingCallDialog::setCallerName(const std::string& ui_title,
const std::string& ui_label,
const std::string& call_type)
{
- setTitle(ui_title + " " + call_type);
+ setTitle(ui_title);
+ // call_type may be a string like " is calling."
LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name");
caller_name_widget->setValue(ui_label + " " + call_type);
}
@@ -2068,15 +2069,11 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
}
else
{
- if (gCacheName->getFullName(caller_id, correct_session_name))
+ // *NOTE: really should be using callbacks here
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(caller_id, &av_name))
{
- // IDEVO really should be using callbacks here
- LLAvatarName av_name;
- if (LLAvatarNameCache::useDisplayNames()
- && LLAvatarNameCache::get(caller_id, &av_name))
- {
- correct_session_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
- }
+ correct_session_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
correct_session_name.append(ADHOC_NAME_SUFFIX);
}
}
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 4a0b0f12a4..409e507c16 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -6180,19 +6180,18 @@ void LLVivoxVoiceClient::notifyFriendObservers()
void LLVivoxVoiceClient::lookupName(const LLUUID &id)
{
- BOOL is_group = FALSE;
- gCacheName->get(id, is_group, &LLVivoxVoiceClient::onAvatarNameLookup);
-
- // Peformance boost: We're going to need the display name later when
- // we show the call request floater, so get the request going now
- LLAvatarName unused;
- LLAvatarNameCache::get(id, &unused);
+ LLAvatarNameCache::get(id,
+ boost::bind(&LLVivoxVoiceClient::onAvatarNameCache,
+ this, _1, _2));
}
-//static
-void LLVivoxVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& name, BOOL is_group)
+void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name)
{
- LLVivoxVoiceClient::getInstance()->avatarNameResolved(id, name);
+ // For Vivox, we use the legacy name because I'm uncertain whether or
+ // not their service can tolerate switching to Username or Display Name
+ std::string legacy_name = av_name.getLegacyName();
+ avatarNameResolved(agent_id, legacy_name);
}
void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name)
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index e6dd0e9823..341f22bd73 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -51,7 +51,7 @@ class LLVivoxProtocolParser;
#endif
#include "llvoiceclient.h"
-
+class LLAvatarName;
class LLVivoxVoiceAccountProvisionResponder;
class LLVivoxVoiceClientMuteListObserver;
class LLVivoxVoiceClientFriendsObserver;
@@ -619,7 +619,7 @@ protected:
void leaveAudioSession();
void lookupName(const LLUUID &id);
- static void onAvatarNameLookup(const LLUUID& id, const std::string& name, BOOL is_group);
+ void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
void avatarNameResolved(const LLUUID &id, const std::string &name);
private: