From 146e9d5e4d9a9a4f33d9ccd47a901980972b7ab9 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 1 Feb 2010 17:06:18 -0800 Subject: Support returning full_name (and SLID) for LLCacheName::get() calls Changed callback signature to full_name instead of first_name,last_name Eliminated all calls to legacy (non-signal/non-boost-bind) lookup mechanism Change Pay dialog names to SLURL links Tweaked layout of Pay Resident and Pay via Object floaters to make SLURLs fit Consolidate name first + " " + last concatenation in LLCacheName::buildFullName() Reviewed with Kelly --- indra/newview/llpanelprofileview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 7832f63e6a..1e7a259b41 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -109,8 +109,8 @@ void LLPanelProfileView::onOpen(const LLSD& key) } // Update the avatar name. - gCacheName->get(getAvatarId(), FALSE, - boost::bind(&LLPanelProfileView::onAvatarNameCached, this, _1, _2, _3, _4)); + gCacheName->get(getAvatarId(), false, + boost::bind(&LLPanelProfileView::onNameCache, this, _1, _2, _3)); /* // disable this part of code according to EXT-2022. See processOnlineStatus // status should only show if viewer has permission to view online/offline. EXT-453 @@ -187,10 +187,10 @@ void LLPanelProfileView::processOnlineStatus(bool online) mStatusText->setVisible(online); } -void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group) +void LLPanelProfileView::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) { llassert(getAvatarId() == id); - getChild("user_name", FALSE)->setValue(first_name + " " + last_name); + getChild("user_name", FALSE)->setValue(full_name); } void LLPanelProfileView::togglePanel(LLPanel* panel, const LLSD& key) -- cgit v1.2.3 From c1ea91fb44653749a382c89aeed6054ac547b064 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 19 Feb 2010 14:41:03 -0800 Subject: Show SLID in side panel full avatar profile --- indra/newview/llpanelprofileview.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 7c9b7aed36..5688c6960b 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -32,11 +32,12 @@ #include "llviewerprecompiledheaders.h" +#include "llpanelprofileview.h" + #include "llavatarconstants.h" +#include "llavatarnamecache.h" // IDEVO #include "lluserrelations.h" -#include "llpanelprofileview.h" - #include "llavatarpropertiesprocessor.h" #include "llcallingcard.h" #include "llpanelavatar.h" @@ -201,7 +202,19 @@ void LLPanelProfileView::processOnlineStatus(bool online) void LLPanelProfileView::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) { llassert(getAvatarId() == id); - getChild("user_name", FALSE)->setValue(full_name); + // IDEVO + LLAvatarName av_name; + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(id, &av_name)) + { + getChild("user_name")->setValue( av_name.mDisplayName ); + getChild("user_slid")->setValue( av_name.mSLID ); + } + else + { + getChild("user_name")->setValue(full_name); + getChild("user_slid")->setValue(""); + } } // EOF -- cgit v1.2.3 From 6d239f7cfae65e6c8354d9f94061e81e82112a44 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 27 Apr 2010 11:56:13 -0700 Subject: Convert profile panel to new avatar name cache --- indra/newview/llpanelprofileview.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 5688c6960b..526db2a192 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -108,8 +108,10 @@ void LLPanelProfileView::onOpen(const LLSD& key) } // Update the avatar name. - gCacheName->get(getAvatarId(), false, - boost::bind(&LLPanelProfileView::onNameCache, this, _1, _2, _3)); +// gCacheName->get(getAvatarId(), false, +// boost::bind(&LLPanelProfileView::onNameCache, this, _1, _2, _3)); + LLAvatarNameCache::get(getAvatarId(), + boost::bind(&LLPanelProfileView::onAvatarNameCache, this, _1, _2)); updateOnlineStatus(); @@ -199,22 +201,11 @@ void LLPanelProfileView::processOnlineStatus(bool online) mStatusText->setValue(status); } -void LLPanelProfileView::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) +void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name) { - llassert(getAvatarId() == id); - // IDEVO - LLAvatarName av_name; - if (LLAvatarNameCache::useDisplayNames() - && LLAvatarNameCache::get(id, &av_name)) - { - getChild("user_name")->setValue( av_name.mDisplayName ); - getChild("user_slid")->setValue( av_name.mSLID ); - } - else - { - getChild("user_name")->setValue(full_name); - getChild("user_slid")->setValue(""); - } + getChild("user_name")->setValue( av_name.mDisplayName ); + getChild("user_slid")->setValue( av_name.mSLID ); } // EOF -- cgit v1.2.3 From 357dc21c1149228d10f446f774a0549ab698b5e8 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 28 Apr 2010 10:46:53 -0700 Subject: Profile clears old data out of name field when shown --- indra/newview/llpanelprofileview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 526db2a192..1afe2b9d44 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -105,11 +105,13 @@ void LLPanelProfileView::onOpen(const LLSD& key) if(id.notNull() && getAvatarId() != id) { setAvatarId(id); + + // clear name fields, which might have old data + getChild("user_name")->setValue( LLSD() ); + getChild("user_slid")->setValue( LLSD() ); } // Update the avatar name. -// gCacheName->get(getAvatarId(), false, -// boost::bind(&LLPanelProfileView::onNameCache, this, _1, _2, _3)); LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileView::onAvatarNameCache, this, _1, _2)); -- cgit v1.2.3 From f4148502e484d516b42c4a88603eee6889d45697 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 18 May 2010 16:00:45 -0700 Subject: Rename mSLID to mUsername to match the name of the field in the UI Product made a late-breaking request to change the name of this field. The wire protocol for People API has not yet changed. --- indra/newview/llpanelprofileview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 1afe2b9d44..d22d8d2718 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -207,7 +207,7 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { getChild("user_name")->setValue( av_name.mDisplayName ); - getChild("user_slid")->setValue( av_name.mSLID ); + getChild("user_slid")->setValue( av_name.mUsername ); } // EOF -- cgit v1.2.3 From bc60707968bd8b2cd2941357a6ff653f6ed2d40e Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 13 Aug 2010 17:33:04 -0700 Subject: DEV-52163 Long display name with wide characters not fully visible in viewer aside from nametag --- indra/newview/llpanelprofileview.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index d22d8d2718..ab235f2b75 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -207,7 +207,22 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { getChild("user_name")->setValue( av_name.mDisplayName ); + getChild("user_name_small")->setValue( av_name.mDisplayName ); getChild("user_slid")->setValue( av_name.mUsername ); + + // show smaller display name if too long to display in regular size + if (getChild("user_name")->getTextPixelWidth() > getChild("user_name")->getRect().getWidth()) + { + getChild("user_name_small")->setVisible( true ); + getChild("user_name")->setVisible( false ); + } + else + { + getChild("user_name_small")->setVisible( false ); + getChild("user_name")->setVisible( true ); + + } + } // EOF -- cgit v1.2.3 From c20bd2dfee1068d5a23eef9a10d21c2035c0b324 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 16 Aug 2010 15:00:51 -0700 Subject: cleaned up LLUICtrlFactory... removed redundant functionality moved buildPanel to LLPanel --- indra/newview/llpanelprofileview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index d59e694be6..56a211091c 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -120,7 +120,7 @@ BOOL LLPanelProfileView::postBuild() { LLPanelProfile::postBuild(); - getTabContainer()[PANEL_NOTES] = getChild(PANEL_NOTES); + getTabContainer()[PANEL_NOTES] = findChild(PANEL_NOTES); //*TODO remove this, according to style guide we don't use status combobox getTabContainer()[PANEL_PROFILE]->getChildView("online_me_status_text")->setVisible( FALSE); -- cgit v1.2.3 From 9a72f91c5ed4b78f4f131a4ae80338566b863f11 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 27 Sep 2010 15:40:02 -0700 Subject: hooked up copy to clipboard button --- indra/newview/llpanelprofileview.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index dfbd355247..bff589c392 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -30,6 +30,7 @@ #include "llavatarconstants.h" #include "llavatarnamecache.h" // IDEVO +#include "llclipboard.h" #include "lluserrelations.h" #include "llavatarpropertiesprocessor.h" @@ -129,7 +130,8 @@ BOOL LLPanelProfileView::postBuild() mStatusText->setVisible(false); childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL); - + childSetCommitCallback("copy_to_clipboard",boost::bind(&LLPanelProfileView::onCopyToClipboard,this),NULL); + return TRUE; } @@ -149,6 +151,12 @@ void LLPanelProfileView::onBackBtnClick() } } +void LLPanelProfileView::onCopyToClipboard() +{ + std::string name = getChild("user_name")->getValue().asString() + " (" + getChild("user_slid")->getValue().asString() + ")"; + gClipboard.copyFromString(utf8str_to_wstring(name)); +} + bool LLPanelProfileView::isGrantedToSeeOnlineStatus() { const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); -- cgit v1.2.3 From f01ba3cf29b45ed312cc7f383a60819b1a8026c6 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Mon, 11 Oct 2010 14:03:14 -0700 Subject: DN-161 Display Name and Username labels shown in profiles when View Display Names setting is off and when Display Names disabled on Simulator DN-163 Set display name error if user changes View Display Name setting to off in preferences with Edit profile panel open --- indra/newview/llpanelprofileview.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 2c4270090c..9011583a60 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -225,6 +225,22 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id, } + if (LLAvatarNameCache::useDisplayNames()) + { + getChild("user_label")->setVisible( true ); + getChild("user_slid")->setVisible( true ); + getChild("display_name_label")->setVisible( true ); + getChild("copy_to_clipboard")->setVisible( true ); + getChild("copy_to_clipboard")->setEnabled( true ); + } + else + { + getChild("user_label")->setVisible( false ); + getChild("user_slid")->setVisible( false ); + getChild("display_name_label")->setVisible( false ); + getChild("copy_to_clipboard")->setVisible( false ); + getChild("copy_to_clipboard")->setEnabled( false ); + } } // EOF -- cgit v1.2.3 From 330ea83c3dd8f56f4cef56481f951b705d28f027 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 13 Oct 2010 15:39:16 -0700 Subject: making profiles look nicer when display names isn't on --- indra/newview/llpanelprofileview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelprofileview.cpp') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 9011583a60..7635aedf58 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -222,7 +222,6 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id, { getChild("user_name_small")->setVisible( false ); getChild("user_name")->setVisible( true ); - } if (LLAvatarNameCache::useDisplayNames()) @@ -232,6 +231,7 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id, getChild("display_name_label")->setVisible( true ); getChild("copy_to_clipboard")->setVisible( true ); getChild("copy_to_clipboard")->setEnabled( true ); + getChild("solo_username_label")->setVisible( false ); } else { @@ -240,6 +240,7 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id, getChild("display_name_label")->setVisible( false ); getChild("copy_to_clipboard")->setVisible( false ); getChild("copy_to_clipboard")->setEnabled( false ); + getChild("solo_username_label")->setVisible( true ); } } -- cgit v1.2.3