From 7a64aad1def1b0612addbf2e66c66db061d7e182 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Thu, 9 Jul 2009 20:56:23 +0000 Subject: DEV-34822 - merge 1.23 merge -r119443 - basic slurl handling ignore dead branch --- indra/newview/llagentui.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'indra/newview/llagentui.cpp') diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 7404fe5bc4..e26c6470ef 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -77,16 +77,15 @@ void LLAgentUI::buildFullname(std::string& name) } //static -std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/) +LLSLURL LLAgentUI::buildSLURL(const bool escaped /*= true*/) { - std::string slurl; - LLViewerRegion *regionp = gAgent.getRegion(); - if (regionp) - { - LLVector3d agentPos = gAgent.getPositionGlobal(); - slurl = LLSLURL::buildSLURLfromPosGlobal(regionp->getName(), agentPos, escaped); - } - return slurl; + LLSLURL slurl; + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); + } + return slurl; } //static -- cgit v1.2.3 From 46fe5d49caef6c8db3df9d88f0d0ec773ef28095 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 26 Mar 2010 14:33:48 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup so that all instances of gAgent.getAvatarObject() use "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject". --- indra/newview/llagentui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagentui.cpp') diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 4601e3241b..97e956c082 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -73,7 +73,8 @@ void LLAgentUI::buildName(std::string& name) //static void LLAgentUI::buildFullname(std::string& name) { - if (gAgent.getAvatarObject()) name = gAgent.getAvatarObject()->getFullname(); + LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); + if (avatarp) name = avatarp->getFullname(); } //static -- cgit v1.2.3 From 94e6e10739c8321b6fb651a109901380ef92975a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 12:00:26 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup to replace all instances of "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject" with "gAgentAvatar". --- indra/newview/llagentui.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/newview/llagentui.cpp') diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 97e956c082..452a11b01e 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -49,12 +49,10 @@ void LLAgentUI::buildName(std::string& name) { name.clear(); - - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - if (avatarp) + if (isAgentAvatarValid()) { - LLNameValue *first_nv = avatarp->getNVPair("FirstName"); - LLNameValue *last_nv = avatarp->getNVPair("LastName"); + LLNameValue *first_nv = gAgentAvatar->getNVPair("FirstName"); + LLNameValue *last_nv = gAgentAvatar->getNVPair("LastName"); if (first_nv && last_nv) { name = first_nv->printData() + " " + last_nv->printData(); @@ -73,8 +71,8 @@ void LLAgentUI::buildName(std::string& name) //static void LLAgentUI::buildFullname(std::string& name) { - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if (avatarp) name = avatarp->getFullname(); + if (isAgentAvatarValid()) + name = gAgentAvatar->getFullname(); } //static -- cgit v1.2.3 From 58d76a9ecf83b49e42fabfada27ca20814f93cf3 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 12:11:51 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup to replace all instances of "gAgentAvatar" with "gAgentAvatarp". --- indra/newview/llagentui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagentui.cpp') diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 452a11b01e..c4597ad6f8 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -51,8 +51,8 @@ void LLAgentUI::buildName(std::string& name) name.clear(); if (isAgentAvatarValid()) { - LLNameValue *first_nv = gAgentAvatar->getNVPair("FirstName"); - LLNameValue *last_nv = gAgentAvatar->getNVPair("LastName"); + LLNameValue *first_nv = gAgentAvatarp->getNVPair("FirstName"); + LLNameValue *last_nv = gAgentAvatarp->getNVPair("LastName"); if (first_nv && last_nv) { name = first_nv->printData() + " " + last_nv->printData(); @@ -72,7 +72,7 @@ void LLAgentUI::buildName(std::string& name) void LLAgentUI::buildFullname(std::string& name) { if (isAgentAvatarValid()) - name = gAgentAvatar->getFullname(); + name = gAgentAvatarp->getFullname(); } //static -- cgit v1.2.3 From 0bb3f144c0a6712a269246975635962b3b5f48d0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 7 Apr 2010 10:37:07 +0100 Subject: Backed out changeset 63b699f90efd --- indra/newview/llagentui.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'indra/newview/llagentui.cpp') diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 15d9f36b74..c4597ad6f8 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -76,15 +76,16 @@ void LLAgentUI::buildFullname(std::string& name) } //static -void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) +std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/) { - LLSLURL return_slurl; - LLViewerRegion *regionp = gAgent.getRegion(); - if (regionp) - { - return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); - } - slurl = return_slurl; + std::string slurl; + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + LLVector3d agentPos = gAgent.getPositionGlobal(); + slurl = LLSLURL::buildSLURLfromPosGlobal(regionp->getName(), agentPos, escaped); + } + return slurl; } //static -- cgit v1.2.3